Author: hannes
Date: 2009-02-17 23:16:15 +0100 (Tue, 17 Feb 2009)
New Revision: 9517
Modified:
apps/gobi/trunk/code/Global/WikiMarkup.js
apps/gobi/trunk/code/Page/PageMacros.js
Log:
Fix previous commit: make sure HTML tags are only stripped from TOC-titles, not the titles in the text.
Details at http://dev.helma.org/trac/helma/changeset/9517
Modified: apps/gobi/trunk/code/Global/WikiMarkup.js
===================================================================
--- apps/gobi/trunk/code/Global/WikiMarkup.js 2009-02-17 22:12:09 UTC (rev 9516)
+++ apps/gobi/trunk/code/Global/WikiMarkup.js 2009-02-17 22:16:15 UTC (rev 9517)
@@ -206,9 +206,9 @@
if (buffer && match.index - written > 0)
buffer.append(chars, written, match.index - written);
written = re.lastIndex;
- var title = stripTags(match[2].trim());
+ var title = match[2].trim();
var header = { type: match[1].length.toString(),
- anchorName: title.toAlphanumeric(),
+ anchorName: stripTags(title).toAlphanumeric(),
title: title };
max = Math.max(header.type, max);
min = Math.min(header.type, min);
Modified: apps/gobi/trunk/code/Page/PageMacros.js
===================================================================
--- apps/gobi/trunk/code/Page/PageMacros.js 2009-02-17 22:12:09 UTC (rev 9516)
+++ apps/gobi/trunk/code/Page/PageMacros.js 2009-02-17 22:16:15 UTC (rev 9517)
@@ -511,7 +511,7 @@
res.write("<a href='#");
res.write(header.anchorName);
res.write("'>");
- res.write(header.title);
+ res.write(stripTags(header.title));
res.write("</a>")
res.write("</li>");
}
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.