Ok here we go. If I use backslashes like this:
<a href="" onclick="document.getElementById('stripimage').innerHTML = '<b>[+TITLE+]</b><br />
<a href=\"[+LINK+]\"><img src=\"[+ENCLOSURE.URL+]\" alt=\"[+TITLE+],posted on [+PUBDATE+]\" /></a><br />
'">[+TITLE+]</a>, I get this output:
<a href="" onclick="document.getElementById('stripimage').innerHTML = '<b>Comic for 04 Mar 2007</b><br />
<a href=\"http://www.dilbert.com/comics/dilbert/archive/dilbert-20070304.html\"><img src=\"http://www.dilbert.com/comics/dilbert/archive/images/dilbert2007030349094.jpg\" alt=\"Comic for 04 Mar 2007,posted on Sun, 04 Mar 2007 00:01:00 -0500\" /></a><br />
'">Comic for 04 Mar 2007</a>
Which is plain, broken HTML.
Using the code for double quotes instead,
", like this:
<a href="" onclick="document.getElementById('stripimage').innerHTML = '<b>[+TITLE+]</b><br />
<a href="[+LINK+]"><img src="[+ENCLOSURE.URL+]" alt="[+TITLE+],posted on [+PUBDATE+]" /></a><br />
'">[+TITLE+]</a> gives this output:
<a href="" id="striplinks" onclick="document.getElementById('stripimage').innerHTML = '<b>Comic for 04 Mar 2007</b><br />
<a href="http://www.dilbert.com/comics/dilbert/archive/dilbert-20070304.html"><img src="http://www.dilbert.com/comics/dilbert/archive/images/dilbert2007030349094.jpg" alt="Comic for 04 Mar 2007,posted on Sun, 04 Mar 2007 00:01:00 -0500" /></a><br />
'">Comic for 04 Mar 2007</a>
..and this doesn’t work either.
It seems like neither HTML nor Javascript wants to take responsibility for parsing the characters here, so javascript don’t parse the backslashes because it considers it html code, and html don’t parse the "e; because it consider it to be part of the javascript code. Or something like that.
I’m sure there’s a way around it and it’s not a major obstacle so I probably shouldn’t use more space on this thread for the subject. But if someone out there know the solution, please speak up