Menu
Hi folks,
I have got a textarea and some html/php code in it. What I want to do is replace php tags with # symbol. Here’s what I got:
[CODE]
sourceCode.replace(/<?php .* ?>/g, “#”);
but if code textarea content looks like this
[b]<a href=”<?php echo $link; ?>” title=”<?php echo $title; ?>”><?php echo $link; ?></a>
the result is following
[b]<a href=”#</a>
while it should look like this
[b]<a href=”#” title=”#”>#</a>
How to correct this issue?