You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by sn...@apache.org on 2006/03/13 18:30:58 UTC
svn commit: r385605 -
/incubator/roller/trunk/src/org/roller/util/Utilities.java
Author: snoopdave
Date: Mon Mar 13 09:30:49 2006
New Revision: 385605
URL: http://svn.apache.org/viewcvs?rev=385605&view=rev
Log:
Fix for ROL-1058, links in comments corrupted by safe-HTML subset
Modified:
incubator/roller/trunk/src/org/roller/util/Utilities.java
Modified: incubator/roller/trunk/src/org/roller/util/Utilities.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/src/org/roller/util/Utilities.java?rev=385605&r1=385604&r2=385605&view=diff
==============================================================================
--- incubator/roller/trunk/src/org/roller/util/Utilities.java (original)
+++ incubator/roller/trunk/src/org/roller/util/Utilities.java Mon Mar 13 09:30:49 2006
@@ -33,8 +33,8 @@
* </pre>
*
* <pre>
- * Also includes addNoFollow() and transformToHTMLSubset() from Simon
- * Brown's Pebble blog server.
+ * Also includes addNoFollow() and transformToHTMLSubset() from
+ * Simon Brown's Pebble blog server (BSD license).
* Copyright (c) 2003-2005, Simon Brown
* All rights reserved.
* </pre>
@@ -70,6 +70,7 @@
private static final Pattern CLOSING_LI_TAG_PATTERN = Pattern.compile("</li>", Pattern.CASE_INSENSITIVE);
private static final Pattern CLOSING_A_TAG_PATTERN = Pattern.compile("</a>", Pattern.CASE_INSENSITIVE);
private static final Pattern OPENING_A_TAG_PATTERN = Pattern.compile("<a href=.*?>", Pattern.CASE_INSENSITIVE);
+ private static final Pattern QUOTE_PATTERN = Pattern.compile(""", Pattern.CASE_INSENSITIVE);
/**
* Utility methods for calling StringUtils since it cannot be
@@ -1075,6 +1076,7 @@
s = replace(s, CLOSING_OL_TAG_PATTERN, "</ol>");
s = replace(s, OPENING_LI_TAG_PATTERN, "<li>");
s = replace(s, CLOSING_LI_TAG_PATTERN, "</li>");
+ s = replace(s, QUOTE_PATTERN, "\"");
// HTTP links
s = replace(s, CLOSING_A_TAG_PATTERN, "</a>");