Quote:
Originally Posted by Jaxel
I've found hundreds of websites all discussing the issue of urlencoding in JavaScript and how there is no real match to the PHP function. They all go into these long winded functions in order to fix the problem, talking about issues of escaping etc... and not ONE of them mentions this PHP.urlencode function. In fact, I can't even find any documentation on the internet that this function exists... which is bizarre, since it clearly works. PHP and JavaScript can't even be used at the same time because PHP is server side and JavaScript is client side. So in order for this function to work, it has to exist in JavaScript. So I guess my next question is, WHY? Why do none of these other articles mention this function? What is the downside? Is there a performance issue? Backwards compatibility? It seems like such a simple fix, while escape() just creates more problems...
|
It's a function vBulletin creates in their JS files, to solve just the problems you mention
There's no downsides that I'm aware of.
Quote:
Originally Posted by Jaxel
BTW, I use UTF-8... and many of the people who've I've convinced to switch to UTF-8 have all reported to me that their forums are faster than ever... I just recently had shoryuken.com switch over and even their users are happy about it.
|
vBulletin itself isn't 100% UTF-8 compatible, though.
I can't comment on speed increases, never tried it tbh.
At any rate, it shouldn't be necessary to make them switch when it can work via that simple function, no?
Fillip