PHP-SugarNewsWikiDocsBugsForumFilesSource LoginRegister
HomeBugsBug #0012
jsvalue gets escaped
Bug #0012
Reported by Sean Middleditch
May 7th, 2008 at 11:23am EDT
The jsvalue function returns a regular string, which goes through the regular escaping, including quote escapes. This unfortunately breaks HTML in legacy mode as they do not parse HTML escapes in JavaScript code. We should probably return an escaped string by default, perhaps changing that for XHTML/XML mode. Complicated.

Comment from Sean Middleditch
Jul 27th, 2008 at 3:33pm
This should now be fixed. In HTML mode, EN_COMPAT is used by htmlentities(). In XHTML/XML mode, EN_QUOTES is used (as it should be).

Additional Comments:
or Login