#16 Apparent URLs in HTML PRE elements are checked

open
nobody
None
5
2004-11-10
2004-11-10
Phil Shaw
No

Documents where example markup is given in PRE
elements are treated as real links. I don't know how the
following will turn out, I'll follow-up with a file if it's a real
mess.

<pre>
&lt;link
rel="stylesheet"
type="text/css"
href="/styles/Example.css"
title="Example" /&gt;
</pre>

In this case the apparent URL /styles/Example.css is
treated as if it is a relative link from the current
document. I suggest markup in pre elements should not
be processed.

Discussion

  • Phil Shaw
    Phil Shaw
    2004-11-10

    Logged In: YES
    user_id=1022070

    A further example is where image references are given in PRE
    elements:

    <pre>
    ...
    menutxt += '&lt;img src=&quot;image.gif&quot; alt=&quot;...
    &quot; /&gt;';
    ...
    </pre>

    In this case, the apparent URL &quot;image.gif&quot; is
    treated as if it is a relative link from the current document.
    That is, it is resolved to literally:

    http://www.example.com/directory/&quot;image.gif&quot;

    Again, this type of reference should not be checked.