1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
<html>
<body>
some text...
<a href="http://foobar.com">Foobar</a>
<a href="http://foobar.com" title="f***** up beyond all recognition">Fubar</a>
<a href="http://strong.foobar.com"><strong>Strong foobar</strong></a>
There should be no extra space before and after the anchor (<a href="http://foobar.com">stripped</a>).
Exception: after an !<a href="http://not.an.image.foobar.com">there</a> should be an extra space.
Even with stripped elements inbetween: !<span><a href="http://still.not.an.image.foobar.com">there</a></span> should be an extra space.
ignore <a href="foo.html"> </a> anchor tags with no link text
not ignore <a href="foo.html"><img src="image.png" alt="An Image" /></a> anchor tags with images
pass through the text of <a href="#content">internal jumplinks</a> without treating them as links
pass through the text of <a id="content">anchor tags with no href</a> without treating them as links
some text...
<img src="http://foobar.com/logo.png">
<img alt="foobar image" src="http://foobar.com/foobar.png">
<img alt="foobar image 2" title="this is the foobar image 2" src="http://foobar.com/foobar2.png">
some text...
</body>
</html>
|