Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

String#escapeHTML checks, String#unescapeHTML cleanup

#51

JDD's rewrite of String#escapeHTML uses a textNode.data = str; result = node.innerHTML; concept to extract an escaped version of the string. Does the length of the string determine if this is faster than the old style of using the .replace functionality?

Also, String#unescapeHTML could use a bit of documentation since it's pretty complex. Maybe a bit of formatting.

Reported by Mark Caudill · August 8th, 2009 @ 12:05 AM

State: resolved
Milestone: none
Assigned to: John-David Dalton John-David Dalton

Activity

  1. John-David Dalton
    John-David Dalton

    Really looking at the benchmarks of small string as I have done work with big strings and they seem fine.
    Will update the unit tests to show the big string benchmarks.

    August 8th, 2009 @ 02:23 AM

  2. John-David Dalton
    John-David Dalton

    The replace really limited the usefulness of this method, though I am not against another method that keeps that simple functionality, I know PHP has something similar.

    February 13th, 2010 @ 02:37 AM

  3. John-David Dalton
    John-David Dalton
    • State changed from new to resolved

    I believe the methods in question have been cleaned up a few times now :D

    April 15th, 2010 @ 02:41 AM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.