all groups > dotnet xml > august 2005 >
You're in the

dotnet xml

group:

Making portion of a page anti-spider/bot


Making portion of a page anti-spider/bot Aaron
8/26/2005 6:27:37 AM
dotnet xml:
I wish for this area to be encode so a spider/bot can not capture/scrape
anything useful from the webpage(s). Only someone that renders and loads the
page can see what text is there.
Here is the xslt snippet, it is part of a asp:xml tag:

<table border="0" width="75%">
<xsl:for-each select="Entry">
<xsl:sort select="DateTime" order="descending"/>
<tr>
<td colspan="2"><xsl:value-of select="Comments"
disable-output-escaping="yes" /></td>
</tr>
<tr>
<td>Posted by:<a href="mailto:{Email}"><xsl:value-of
select="Name"/></a></td>
<td align="right"><xsl:value-of select="DateTime"/></td>
</tr>
<tr>
<td colspan="2"><hr color="Background"/></td>
</tr>
</xsl:for-each>
</table>


TIA
Aaron


Re: Making portion of a page anti-spider/bot Julian F. Reschke
8/28/2005 12:00:00 AM
[quoted text, click to view]

If you publish HTML for rendering in browsers, there's no way to avoid
that the same data can be read by other tools as well.

Re: Making portion of a page anti-spider/bot Pascal Schmitt
8/29/2005 12:00:00 AM
Hello!

[quoted text, click to view]

But it is said that most spam-bots don't understand escape codes such as
&#x2020; - but there is no easy way to generate something like this in
XSLT.
The safest way is to replace the "@" with " (at) " hoping your visitors
will understand that they have to re-replace it...

AFAIR it should look like this:

<a href="mailto:{substring-before(Email,'@')} (at)
{substring-after(Email,'@')}" />


An other way, wich only works in Opera, would be this:

HTML: <adress>user<span>(at)</span>domain.tld</adress>
CSS: adress>span { content: '@' }
Will be rendered as "user@domain.tld"



--
AddThis Social Bookmark Button