Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>This may be due to the fact that the specification says that browsers must handle attributes without quotes around them in certian instances, combined with the fact that the slash (solidus) character will confuse the validation processing in rare circumtances. This may also be compounded by the poor choice of "text" as a variable name as "text" is a valid attribute for some elements. I note that you do not have a closing semi-colon which may also contribute.</p> <pre><code>var fullurl = '/pictures/' + url; mytext = mytext + '&lt;img src="' + fullurl + '" alt="Photos" border="0" class="carousel-photo" /&gt;'; </code></pre> <p>One alternative might be to remove the optional closing solidus as well:</p> <pre><code>var fullurl = '/pictures/' + url; mytext = mytext + '&lt;img src="' + fullurl + '" alt="Photos" border="0" class="carousel-photo"&gt;' </code></pre> <p>Further, it might be better to set the src attribute after the image is inserted within the flow:</p> <pre><code>var fullurl = '/pictures/' + url; mytext = mytext + '&lt;img src="" alt="Photos" border="0" class="carousel-photo" /&gt;'; </code></pre> <p>..after insert, set the src attribute using the <code>fullurl</code> uri component string. NOTE: it IS a uri, not a url that is given as the src attribute content.</p> <p>Another might be to reverse the use of the single/double quotes:</p> <pre><code>var fullurl = "/pictures/" + url; mytext = mytext + "&lt;img src='" + fullurl + "' alt='Photos' border='0' class='carousel-photo'&gt;"; </code></pre> <p>Special caveat, you should NOT use this image string inside a 'q' element or a block quote.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload