Be the first to rate this file! 102 downloads (last 30 days) File Size: 1.47 KB File ID: #22760

Unescape a JavaScript String

by Matthew Simoneau

 

22 Jan 2009 (Updated 22 Jan 2009)

Code covered by BSD License  

Manually interprets a JavaScript string, which may contain escape characters.

Download Now | Watch this File

File Information
Description

unescapeJavascriptString manually interprets a JavaScript string, which may contain escape characters. This is sometimes useful when scraping HTML.

MATLAB release MATLAB 7.7 (R2008b)
Zip File Content  
Other Files license.txt,
unescapeJavascriptString.m
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
23 Jan 2009 us

hmmm...
matthew,
i had a string, which contained the - certainly valid - word 'THIS_IS_ESCAPED_DUDE'...
and it got all screwed up...
:-)
us

23 Jan 2009 Matthew Simoneau

Yes, us, that is a real problem!

There's probably a clever way to avoid this hack, but it didn't come to mind.

Please login to add a comment or rating.
Updates
22 Jan 2009

Stray space in description.

Tag Activity for this File
Tag Applied By Date/Time
javascript Matthew Simoneau 22 Jan 2009 15:52:01
strings Matthew Simoneau 22 Jan 2009 15:52:01
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com