What's the solution for this kind of problem?

Posted by wamp on Stack Overflow See other posts from Stack Overflow or by wamp
Published on 2010-05-28T10:06:27Z Indexed on 2010/05/28 10:12 UTC
Read the original article Hit count: 94

Filed under:
|
|
<a onclick="run(&#039;Hi, Tim!  I&amp;#039;ve got two&#039;, &#039;">test</a>

The onclick event is not run at all.

The above is generated by something like this:

<a onclick="run(<?php echo htmlentities($str) ?>)">test</a>

How to fix it?

© Stack Overflow or respective owner

Related posts about php

Related posts about JavaScript