[Yanel-commits] rev 24040 - in public/yanel/trunk/src:
contributions/resources/wiki/src/build
contributions/resources/wiki/src/java/org/wyona/yanel/impl/resources
realms/use-cases/yanel/data/hello/wiki
simon at wyona.com
simon at wyona.com
Fri Apr 27 09:38:44 CEST 2007
Author: simon
Date: 2007-04-27 09:38:42 +0200 (Fri, 27 Apr 2007)
New Revision: 24040
Modified:
public/yanel/trunk/src/contributions/resources/wiki/src/build/dependencies.xml
public/yanel/trunk/src/contributions/resources/wiki/src/java/org/wyona/yanel/impl/resources/LinkChecker.java
public/yanel/trunk/src/realms/use-cases/yanel/data/hello/wiki/hello-world.txt
Log:
fixes bug #5310 thanks to josias!
Modified: public/yanel/trunk/src/contributions/resources/wiki/src/build/dependencies.xml
===================================================================
--- public/yanel/trunk/src/contributions/resources/wiki/src/build/dependencies.xml 2007-04-27 06:31:15 UTC (rev 24039)
+++ public/yanel/trunk/src/contributions/resources/wiki/src/build/dependencies.xml 2007-04-27 07:38:42 UTC (rev 24040)
@@ -21,7 +21,7 @@
version="2.4.71"/>
<dependency groupId="wyona-org-wiki-parser" artifactId="jsp-wiki-parser"
- version="0.0.1-dev-r20369"/>
+ version="0.0.1-dev-r24028"/>
<dependency groupId="wyona-org-wiki-parser" artifactId="wiki-parser-factory"
version="r19560"/>
<dependency groupId="wyona-org-wiki-parser" artifactId="wyona-wiki-parser"
Modified: public/yanel/trunk/src/contributions/resources/wiki/src/java/org/wyona/yanel/impl/resources/LinkChecker.java
===================================================================
--- public/yanel/trunk/src/contributions/resources/wiki/src/java/org/wyona/yanel/impl/resources/LinkChecker.java 2007-04-27 06:31:15 UTC (rev 24039)
+++ public/yanel/trunk/src/contributions/resources/wiki/src/java/org/wyona/yanel/impl/resources/LinkChecker.java 2007-04-27 07:38:42 UTC (rev 24040)
@@ -76,12 +76,8 @@
for(int i = 0; i < attrs.getLength(); i++) {
String aName = attrs.getQName(i);
String aValue = attrs.getValue(i);
- StringBuffer tmp = new StringBuffer();
- for(int j=0; j<aValue.length(); j++) {
- if(aValue.charAt(j) == '"') tmp.append(""");
- else tmp.append(aValue.charAt(j));
- }
- transformedXmlAsBuffer.append(" " + aName + "=\"" + replaceEntities(tmp.toString()) + "\"");
+
+ transformedXmlAsBuffer.append(" " + aName + "=\"" + replaceEntities(aValue) + "\"");
}
}
transformedXmlAsBuffer.append(">");
@@ -103,6 +99,7 @@
* @return
*/
private String replaceEntities(String str) {
+ str = str.replaceAll("&", "&");
str = str.replaceAll("<", "<");
str = str.replaceAll(">", ">");
str = str.replaceAll("'", "'");
Modified: public/yanel/trunk/src/realms/use-cases/yanel/data/hello/wiki/hello-world.txt
===================================================================
--- public/yanel/trunk/src/realms/use-cases/yanel/data/hello/wiki/hello-world.txt 2007-04-27 06:31:15 UTC (rev 24039)
+++ public/yanel/trunk/src/realms/use-cases/yanel/data/hello/wiki/hello-world.txt 2007-04-27 07:38:42 UTC (rev 24040)
@@ -63,3 +63,9 @@
|Column 1, Row 1|Column 2, Row 1|
|Column 1, Row 2|Column 2, Row 2|
+
+----
+
+Test for special characters like & < > ' ":\\
+<element attr="bla">äöü</element>\\
+'test' "test"
More information about the Yanel-commits
mailing list