|
Posted by Rik on 08/25/07 19:32
On Sat, 25 Aug 2007 20:24:41 +0200, <encepif@gmail.com> wrote:
> Hopefully someone can give me definitive answer:
>
> What steps can I take to do this process, so no breakdowns in
> presentation occurs when I use,
>
> <script>
> document.getElementById("somewhere").innerHTML =3D '<?print
> $someblog[0];?>'
'<?php print..' you mean?
> </script>
>
> <div id=3Dsomewhere></div>
>
> So, someblog[0] might have weird characters, un-escaped whatevers,
> that clog of the div presentation. I am not sure what to catch or
> what converters to use. What are basic considerations & science do I
> need to apply to the string prior to presentation in the div? :-)
(If no html is allowed, either htmlspecialchars or striptags.)
Replace linebreaks with literal '\n'. Escape quotes. And finally: make =
sure it's in the right character set.
-- =
Rik Wasmus
Navigation:
[Reply to this message]
|