#14264getUpdateJS: broken when using UTF-8 and IE
Description
The function getUpdateJS in class.tslib_content.php, used by feAdmin_Lib, does not work correctly when using an UTF-8 encoded site and Microsoft Internet Explorer.
The part in question is where it outputs: unescape(‘”.rawurlencode($value).”’)
The JS escape/unescape functions under IE behave differently than PHPs urlencode functions:
escape(‘ü’) -> %FC (‘ü’: UTF-8 code for German u umlaut ü)
rawurlencode(‘ü’) -> %C3%BC
when the JS function unescape is executed with the value of rawurlencode(‘ü’), the browser shows ‘ü’ instead of ‘ü’.
With Netscape 7.1 it works ok.
See the attached utftest.php for a demonstration.
When using feAdmin_lib or ‘sr_feuser_register’, this problem leads to strange characters in the database when entering non-ASCII characters, e.g. German umlauts.
I temporarily solved this problem by not using unescape/rawurlencode in getUpdateJS, but I don’t know if this does not lead to other problems somewhere!?
(issue imported from #M277)
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.