Re: innerHTML and PHP string parsing
- From: Randy Webb <HikksNotAtHome@xxxxxxx>
- Date: Wed, 12 Apr 2006 17:19:58 -0400
Thomas 'PointedEars' Lahn said the following on 4/12/2006 8:23 AM:
endlesstide@xxxxxxxxx wrote:
Is there a PHP command to convert a $string of HTML
into something friendly for innerHTML population?
You need to escape "</" as "<\/" if PHP generates
script code as content of a HTML `script' element.
That's debatable.
PHP programming is off-topic here.
That is true, but, the implications of what PHP generates to Javascript executing in the UA *is* on-topic here. And in order to know what to do in PHP to make it JS friendly then you have to find out what is JS friendly first. And you find that out - gasp - in a Javascript newsgroup, not in a PHP group.
I get a undtermined string constant error sometimes.
"Doctor, I'm ill sometimes. What did I do wrong?"
Umm, you read too many of Thomas' Usenet posts?
--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
.
- Follow-Ups:
- OT:Re: innerHTML and PHP string parsing
- From: optimistx
- OT:Re: innerHTML and PHP string parsing
- References:
- innerHTML and PHP string parsing
- From: endlesstide
- Re: innerHTML and PHP string parsing
- From: Thomas 'PointedEars' Lahn
- innerHTML and PHP string parsing
- Prev by Date: Re: MAC Safari compatibility problem 2
- Next by Date: Re: can some1 help with my kink is java
- Previous by thread: Re: innerHTML and PHP string parsing
- Next by thread: OT:Re: innerHTML and PHP string parsing
- Index(es):
Relevant Pages
|