xsl-list
[Top] [All Lists]

RE: [xsl] DOE an attribute to prevent spam?

2007-10-05 06:19:10
disable-output-escaping is defined to work only on text nodes, not on
attribute nodes.

Michael Kay
http://www.saxonica.com/ 

-----Original Message-----
From: Phill [mailto:phill(_at_)theactivitypeople(_dot_)co(_dot_)uk] 
Sent: 05 October 2007 13:20
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] DOE an attribute to prevent spam?

Hi all

There's a common trick to prevent bots scanning sites and 
collecting email addresses which involves xml-encoding all 
the characters in the href attribute of links. We've been 
using it in production for a while, and haven't seen any 
problems with it.

We're trying to use this technique within our XSL 
stylesheets, and have found that DOE doesn't work at all, 
even when using the following format:

<a>
    <xsl:attribute name="href">
        <xsl:value-of select="$encodedemail" 
disable-output-escaping="yes" />
    </xsl:attribute>
    <xsl:value-of select="$encodedemail" 
disable-output-escaping="yes" /> </a>

The link value is correctly encoded, but the href also 
encodes the ampersand. I've tried tweaking the output, but 
can't seem to get it to format correctly.

We're using XSL1.0 and PHP5, with some EXSLT functionality.

Any ideas how I can get this working?

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>