You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by cr...@apache.org on 2004/09/19 17:37:28 UTC

svn commit: rev 46332 - in forrest/trunk/src: core/context/resources/schema/dtd core/context/resources/schema/relaxng core/context/skins/common core/context/skins/common/xslt/html core/fresh-site/src/documentation documentation

Author: crossley
Date: Sun Sep 19 08:37:27 2004
New Revision: 46332

Modified:
   forrest/trunk/src/core/context/resources/schema/dtd/skinconfig-v06-3.dtd
   forrest/trunk/src/core/context/resources/schema/relaxng/skinconf.rnc
   forrest/trunk/src/core/context/skins/common/skinconf.xsl
   forrest/trunk/src/core/context/skins/common/xslt/html/site2xhtml.xsl
   forrest/trunk/src/core/fresh-site/src/documentation/skinconf.xml
   forrest/trunk/src/documentation/skinconf.xml
Log:
Enable email address obfuscation to be configurable using the
obfuscate-mail-value option in skinconf.xml
Issue: FOR-122


Modified: forrest/trunk/src/core/context/resources/schema/dtd/skinconfig-v06-3.dtd
==============================================================================
--- forrest/trunk/src/core/context/resources/schema/dtd/skinconfig-v06-3.dtd	(original)
+++ forrest/trunk/src/core/context/resources/schema/dtd/skinconfig-v06-3.dtd	Sun Sep 19 08:37:27 2004
@@ -40,7 +40,8 @@
   <!ELEMENT skinconfig (search?, disable-print-link?, disable-pdf-link?,
    disable-pod-link?, disable-txt-link?,
    disable-xml-link?, disable-external-link-image?, 
-   disable-compliance-links?, obfuscate-mail-links?, disable-font-script?, 
+   disable-compliance-links?, obfuscate-mail-links?, obfuscate-mail-value?, 
+   disable-font-script?, 
    project-name?, project-description?, project-url?, project-logo,
    group-name?, group-description?, group-url?, group-logo?,
    host-url?, host-logo?, favicon-url?, year?, vendor?, copyright-link?, trail?, 
@@ -60,6 +61,7 @@
   <!ELEMENT disable-compliance-links (#PCDATA)>
   <!ATTLIST disable-compliance-links align  CDATA #IMPLIED>
   <!ELEMENT obfuscate-mail-links (#PCDATA)>
+  <!ELEMENT obfuscate-mail-value (#PCDATA)>
   <!ELEMENT disable-font-script (#PCDATA)>
   <!ELEMENT project-name (#PCDATA)>
   <!ELEMENT project-description (#PCDATA)>

Modified: forrest/trunk/src/core/context/resources/schema/relaxng/skinconf.rnc
==============================================================================
--- forrest/trunk/src/core/context/resources/schema/relaxng/skinconf.rnc	(original)
+++ forrest/trunk/src/core/context/resources/schema/relaxng/skinconf.rnc	Sun Sep 19 08:37:27 2004
@@ -27,6 +27,7 @@
             element disable-external-link-image{xsd:boolean}?,   # Disable images on external links feature. 'true' or 'false'
             element disable-compliance-links {xsd:boolean}?,   # Disable standards-compliance logos
             element obfuscate-mail-links {xsd:boolean}?,   # Render mailto: links unrecognisable by spam harvesters
+            element obfuscate-mail-value {text}?,   # value to use to replace the @ symbol
             element searchsite-domain {text}?,       # DNS domain to search. Eg 'xml.apache.org'
             element searchsite-name {text}?,         # "Search the ... site"
             element project-name {text},             # Eg 'Forrest'

Modified: forrest/trunk/src/core/context/skins/common/skinconf.xsl
==============================================================================
--- forrest/trunk/src/core/context/skins/common/skinconf.xsl	(original)
+++ forrest/trunk/src/core/context/skins/common/skinconf.xsl	Sun Sep 19 08:37:27 2004
@@ -36,6 +36,9 @@
      <xsl:if test="not(obfuscate-mail-links)">     
        <obfuscate-mail-links>true</obfuscate-mail-links>
      </xsl:if>
+     <xsl:if test="not(obfuscate-mail-value)">     
+       <obfuscate-mail-value>.at.</obfuscate-mail-value>
+     </xsl:if>
      <xsl:if test="not(disable-font-script)">     
        <disable-font-script>true</disable-font-script>
      </xsl:if>

Modified: forrest/trunk/src/core/context/skins/common/xslt/html/site2xhtml.xsl
==============================================================================
--- forrest/trunk/src/core/context/skins/common/xslt/html/site2xhtml.xsl	(original)
+++ forrest/trunk/src/core/context/skins/common/xslt/html/site2xhtml.xsl	Sun Sep 19 08:37:27 2004
@@ -259,7 +259,8 @@
       <xsl:when test="$obfuscate-mail-links='true' and starts-with(@href, 'mailto:') and contains(@href, '@')">
         <xsl:variable name="mailto-1" select="substring-before(@href,'@')"/>
         <xsl:variable name="mailto-2" select="substring-after(@href,'@')"/>
-          <a href="{$mailto-1}.at.{$mailto-2}">
+        <xsl:variable name="obfuscation" select="normalize-space(//skinconfig/obfuscate-mail-value)"/>
+          <a href="{$mailto-1}{$obfuscation}{$mailto-2}">
             <xsl:apply-templates/>
           </a>
        </xsl:when>

Modified: forrest/trunk/src/core/fresh-site/src/documentation/skinconf.xml
==============================================================================
--- forrest/trunk/src/core/fresh-site/src/documentation/skinconf.xml	(original)
+++ forrest/trunk/src/core/fresh-site/src/documentation/skinconf.xml	Sun Sep 19 08:37:27 2004
@@ -63,6 +63,7 @@
 
   <!-- Render mailto: links unrecognisable by spam harvesters? -->
   <obfuscate-mail-links>true</obfuscate-mail-links>
+  <obfuscate-mail-value>.at.</obfuscate-mail-value>
 
   <!-- Disable the javascript facility to change the font size -->
   <disable-font-script>true</disable-font-script>

Modified: forrest/trunk/src/documentation/skinconf.xml
==============================================================================
--- forrest/trunk/src/documentation/skinconf.xml	(original)
+++ forrest/trunk/src/documentation/skinconf.xml	Sun Sep 19 08:37:27 2004
@@ -50,6 +50,7 @@
 
   <!-- Render mailto: links unrecognisable by spam harvesters? -->
   <obfuscate-mail-links>true</obfuscate-mail-links>
+  <obfuscate-mail-value>.at.</obfuscate-mail-value>
 
   <!-- Disable the javascript facility to change the font size -->
   <disable-font-script>false</disable-font-script>