summaryrefslogtreecommitdiffstats
path: root/emacs.d/nxhtml/tests/in/chunks.html
diff options
context:
space:
mode:
Diffstat (limited to 'emacs.d/nxhtml/tests/in/chunks.html')
-rw-r--r--emacs.d/nxhtml/tests/in/chunks.html63
1 files changed, 63 insertions, 0 deletions
diff --git a/emacs.d/nxhtml/tests/in/chunks.html b/emacs.d/nxhtml/tests/in/chunks.html
new file mode 100644
index 0000000..62a3bf8
--- /dev/null
+++ b/emacs.d/nxhtml/tests/in/chunks.html
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title></title>
+ <script type="text/javascript">
+ // <![CDATA[
+ alert ("here");
+ /*
+ --------------------------------------------------------------------------
+ Do not edit past this point unless you know what you are doing.
+ --------------------------------------------------------------------------
+ ===== BUG: THIS LINE IS BLACK ==========
+ ===== BUG: THIS LINE IS BLACK ==========
+ */
+
+ addEvent(window, 'load', spamSpan);
+
+ function spamSpan() {
+ var allSpamSpans = getElementsByClass(spamSpanMainClass, document, 'span');
+ for (var i = 0; i < allSpamSpans.length; i++) {
+ // get data
+ var user = getSpanValue(spamSpanUserClass, allSpamSpans[i]);
+ var domain = getSpanValue(spamSpanDomainClass, allSpamSpans[i]);
+ var anchorText = getSpanValue(spamSpanAnchorTextClass, allSpamSpans[i]);
+ // prepare parameter data
+ var paramValues = new Array();
+ for (var j = 0; j < spamSpanParams.length; j++) {
+ var paramSpanValue = getSpanValue(spamSpanParams[j], allSpamSpans[i]);
+ if (paramSpanValue) {
+ paramValues.push(spamSpanParams[j] + '=' +
+ encodeURIComponent(paramSpanValue));
+ }
+ }
+ // create new anchor tag
+ var at = String.fromCharCode(32*2);
+ var email = cleanSpan(user) + at + cleanSpan(domain);
+ var anchorTagText = document.createTextNode(anchorText ? anchorText : email);
+ var mto = String.fromCharCode(109,97,105,108,116,111,58);
+ var hrefAttr = mto + email;
+ hrefAttr += paramValues.length ? '?' + paramValues.join('&') : '';
+ var anchorTag = document.createElement('a');
+ anchorTag.className = spamSpanMainClass;
+ anchorTag.setAttribute('href', hrefAttr);
+ anchorTag.appendChild(anchorTagText);
+ // replace the span with anchor
+ allSpamSpans[i].parentNode.replaceChild(anchorTag, allSpamSpans[i]);
+ }
+ }
+ // ]]>
+ </script>
+ <style type="text/css" media="all">
+ /* <![CDATA[ */
+ body {
+ margin-left: 1px;
+ /* ]]> */
+ </style>
+
+ </head>
+ <body>
+ </body>
+</html>