Log in

View Full Version : own BB code - {param} with ' and "


matkus
08-28-2007, 10:07 AM
I have some problem.
I have some database and script to browse it. On my board i have own BB code, that shows data from that database using ajax. The problem is, that {param} must be passed to javascript, and it can containt both ' and " characters.
example:
someparam
is replaced to <a href="someadderss?param={param}" onmouseover="somefunction('{param');">{param}</a>
The problem is, that if param contains ' or " BB code does not work correctly.

Anyone have some idea how to convert those characters to some replacement code (&quot; and &apos; ) ?