Simple Perl script help required.
Posted
by Umar Siddique
on Stack Overflow
See other posts from Stack Overflow
or by Umar Siddique
Published on 2010-06-01T10:37:14Z
Indexed on
2010/06/01
11:33 UTC
Read the original article
Hit count: 466
JavaScript
|perl
I'm looking to create a perl script that I will run on a JavaScript file to automatically change ( ' ) that breaks the script.
Example:
file.js
document.writeln('» <a href="/LINK1" TARGET="_blank">Lorem ipsum lorem 1</a><br>');
document.writeln('» <a href="/LINK2" TARGET="_blank">Lorem ipsum lor'em x em 2</a><br>');
document.writeln('» <a href="/LINK3" TARGET="_blank">Lorem ipsum lorem 3</a><br>');
In 2nd line " Lorem ipsum lor'em x em 2 " contains a single quote which will be removed by script. Rest of the single quotes will be there like " document.writeln(' "
© Stack Overflow or respective owner