On Jun 26, 2006, at 11:39 AM, [EMAIL PROTECTED] wrote:
>
> The documentation for the escapeHTML function says that it "Make[s] a
> string safe for HTML, converting the usual suspects (lt, gt, quot,
> apos, amp)". The problem is that it doesn't work with apostrophes.
>
> Looking at the source code (I'm using the packed version of 1.3.1), it
> seems as though the apostrophe replacement is missing:
>
> escapeHTML:function(s){
> return
> s.replace(/&/g,"&").replace(/"/g,""").replace(/</
> g,"<").replace(/>/g,">");
>
> I believe that adding ".replace(/'/, "'")" to the end of the
> replacement sequence will fix the problem.
Why do you want apostrophes to be escaped? This seems like a case
where the documentation is just incorrect, I don't see any point in
making it do that.
-bob
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"MochiKit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/mochikit
-~----------~----~----~----~------~----~------~--~---