[seam-commits] Seam SVN: r7522 - in trunk/examples/wiki: src/etc/META-INF and 7 other directories.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Mon Mar 10 14:35:14 EDT 2008


Author: christian.bauer at jboss.com
Date: 2008-03-10 14:35:14 -0400 (Mon, 10 Mar 2008)
New Revision: 7522

Added:
   trunk/examples/wiki/lib/commons-lang-2.3.jar
   trunk/examples/wiki/src/etc/META-INF/stringutils.taglib.xml
Modified:
   trunk/examples/wiki/src/etc/META-INF/wiki.taglib.xml
   trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/FeedEntryManager.java
   trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/FeedEntry.java
   trunk/examples/wiki/src/main/org/jboss/seam/wiki/util/WikiUtil.java
   trunk/examples/wiki/view/includes/wikiTextEditor.xhtml
   trunk/examples/wiki/view/plugins/feedAggregator/plugin.xhtml
   trunk/examples/wiki/view/plugins/feedTeasers/plugin.xhtml
   trunk/examples/wiki/view/themes/sfwkorg/css/sfwk.css
Log:
JBSEAM-2711, fixed escaping for feed title/body rendering

Added: trunk/examples/wiki/lib/commons-lang-2.3.jar
===================================================================
(Binary files differ)


Property changes on: trunk/examples/wiki/lib/commons-lang-2.3.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/examples/wiki/src/etc/META-INF/stringutils.taglib.xml
===================================================================
--- trunk/examples/wiki/src/etc/META-INF/stringutils.taglib.xml	                        (rev 0)
+++ trunk/examples/wiki/src/etc/META-INF/stringutils.taglib.xml	2008-03-10 18:35:14 UTC (rev 7522)
@@ -0,0 +1,734 @@
+<?xml version="1.0"?><!DOCTYPE facelet-taglib PUBLIC
+        "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN"
+        "http://java.sun.com/dtd/facelet-taglib_1_0.dtd">
+
+<!-- Note:
+    All deprecated methods have been dropped, as well as any with char[] arguments. The
+    Facelets template parser doesn't like primitive arrays.
+-->
+<facelet-taglib>
+    <namespace>http://org.apache.commons.lang/StringUtils</namespace>
+
+    <function>
+        <function-name>trim</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String trim(java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>trimToNull</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String trimToNull(java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>trimToEmpty</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String trimToEmpty(java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>strip</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String strip(java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>stripToNull</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String stripToNull(java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>stripToEmpty</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String stripToEmpty(java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>stripChars</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String strip(java.lang.String, java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>stripCharsStart</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String stripStart(java.lang.String, java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>stripCharsEnd</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String stripEnd(java.lang.String, java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>stripAll</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String[] stripAll(java.lang.String[])</function-signature>
+    </function>
+
+    <function>
+        <function-name>stripAllChars</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String[] stripAll(java.lang.String[], java.lang.String)
+        </function-signature>
+    </function>
+
+    <function>
+        <function-name>equals</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>boolean equals(java.lang.String, java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>equalsIgnoreCase</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>boolean equalsIgnoreCase(java.lang.String, java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>indexOfChar</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>int indexOf(java.lang.String, char)</function-signature>
+    </function>
+
+    <function>
+        <function-name>indexOfCharStart</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>int indexOf(java.lang.String, char, int)</function-signature>
+    </function>
+
+    <function>
+        <function-name>indexOf</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>int indexOf(java.lang.String, java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>ordinalIndexOf</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>int ordinalIndexOf(java.lang.String, java.lang.String, int)</function-signature>
+    </function>
+
+    <function>
+        <function-name>indexOfStart</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>int indexOf(java.lang.String, java.lang.String, int)</function-signature>
+    </function>
+
+    <function>
+        <function-name>lastIndexOfChar</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>int lastIndexOf(java.lang.String, char)</function-signature>
+    </function>
+
+    <function>
+        <function-name>lastIndexOfCharStart</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>int lastIndexOf(java.lang.String, char, int)</function-signature>
+    </function>
+
+    <function>
+        <function-name>lastIndexOf</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>int lastIndexOf(java.lang.String, java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>lastIndexOfStart</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>int lastIndexOf(java.lang.String, java.lang.String, int)</function-signature>
+    </function>
+
+    <function>
+        <function-name>containsChar</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>boolean contains(java.lang.String, char)</function-signature>
+    </function>
+
+    <function>
+        <function-name>contains</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>boolean contains(java.lang.String, java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>containsIgnoreCase</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>boolean containsIgnoreCase(java.lang.String, java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>indexOfAny</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>int indexOfAny(java.lang.String, java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>indexOfAnyBut</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>int indexOfAnyBut(java.lang.String, java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>containsOnly</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>boolean containsOnly(java.lang.String, java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>containsNone</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>boolean containsNone(java.lang.String, java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>indexOfAnyStrings</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>int indexOfAny(java.lang.String, java.lang.String[])</function-signature>
+    </function>
+
+    <function>
+        <function-name>lastIndexOfAny</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>int lastIndexOfAny(java.lang.String, java.lang.String[])</function-signature>
+    </function>
+
+    <function>
+        <function-name>substring</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String substring(java.lang.String, int)</function-signature>
+    </function>
+
+    <function>
+        <function-name>subStringEnd</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String substring(java.lang.String, int, int)</function-signature>
+    </function>
+
+    <function>
+        <function-name>left</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String left(java.lang.String, int)</function-signature>
+    </function>
+
+    <function>
+        <function-name>right</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String right(java.lang.String, int)</function-signature>
+    </function>
+
+    <function>
+        <function-name>mid</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String mid(java.lang.String, int, int)</function-signature>
+    </function>
+
+    <function>
+        <function-name>substringBefore</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String substringBefore(java.lang.String, java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>substringAfter</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String substringAfter(java.lang.String, java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>substringBeforeLast</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String substringBeforeLast(java.lang.String, java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>substringAfterLast</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String substringAfterLast(java.lang.String, java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>substringBetween</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String substringBetween(java.lang.String, java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>substringBetweenTwo</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String substringBetween(java.lang.String, java.lang.String, java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>substringsBetween</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String[] substringsBetween(java.lang.String, java.lang.String, java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>split</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String[] split(java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>splitChar</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String[] split(java.lang.String, char)</function-signature>
+    </function>
+
+    <function>
+        <function-name>splitString</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String[] split(java.lang.String, java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>splitMax</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String[] split(java.lang.String, java.lang.String, int)</function-signature>
+    </function>
+
+    <function>
+        <function-name>splitByWholeSeparator</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String[] splitByWholeSeparator(java.lang.String, java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>splitByWholeSeparatorMax</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String[] splitByWholeSeparator(java.lang.String, java.lang.String, int)</function-signature>
+    </function>
+
+    <function>
+        <function-name>splitPreserveAllTokens</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String[] splitPreserveAllTokens(java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>splitPreserveAllTokensChar</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String[] splitPreserveAllTokens(java.lang.String, char)</function-signature>
+    </function>
+
+    <function>
+        <function-name>splitPreserveAllTokensString</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String[] splitPreserveAllTokens(java.lang.String, java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>splitPreserveAllTokensMax</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String[] splitPreserveAllTokens(java.lang.String, java.lang.String, int)</function-signature>
+    </function>
+
+    <function>
+        <function-name>join</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String join(java.lang.Object[])</function-signature>
+    </function>
+
+    <function>
+        <function-name>joinChar</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String join(java.lang.Object[], char)</function-signature>
+    </function>
+
+    <function>
+        <function-name>joinCharStartEnd</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String join(java.lang.Object[], char, int, int)</function-signature>
+    </function>
+
+    <function>
+        <function-name>joinString</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String join(java.lang.Object[], java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>joinStringStartEnd</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String join(java.lang.Object[], java.lang.String, int, int)</function-signature>
+    </function>
+
+    <function>
+        <function-name>joinIteratorChar</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String join(java.util.Iterator, char)</function-signature>
+    </function>
+
+    <function>
+        <function-name>joinIteratorString</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String join(java.util.Iterator, java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>joinCollectionChar</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String join(java.util.Collection, char)</function-signature>
+    </function>
+
+    <function>
+        <function-name>joinCollectionString</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String join(java.util.Collection, java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>deleteSpaces</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String deleteSpaces(java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>deleteWhitespace</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String deleteWhitespace(java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>removeStart</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String removeStart(java.lang.String, java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>removeEnd</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String removeEnd(java.lang.String, java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>remove</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String remove(java.lang.String, java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>removeChar</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String remove(java.lang.String, char)</function-signature>
+    </function>
+
+    <function>
+        <function-name>replaceOnce</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String replaceOnce(java.lang.String, java.lang.String, java.lang.String)
+        </function-signature>
+    </function>
+
+    <function>
+        <function-name>replace</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String replace(java.lang.String, java.lang.String, java.lang.String)
+        </function-signature>
+    </function>
+
+    <function>
+        <function-name>replaceMax</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String replace(java.lang.String, java.lang.String, java.lang.String, int)
+        </function-signature>
+    </function>
+
+    <function>
+        <function-name>replaceChars</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String replaceChars(java.lang.String, char, char)</function-signature>
+    </function>
+
+    <function>
+        <function-name>replaceCharsString</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String replaceChars(java.lang.String, java.lang.String, java.lang.String)
+        </function-signature>
+    </function>
+
+    <function>
+        <function-name>overlay</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String overlay(java.lang.String, java.lang.String, int, int)
+        </function-signature>
+    </function>
+
+    <function>
+        <function-name>chomp</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String chomp(java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>chompString</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String chomp(java.lang.String, java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>repeat</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String repeat(java.lang.String, int)</function-signature>
+    </function>
+
+    <function>
+        <function-name>rightPad</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String rightPad(java.lang.String, int)</function-signature>
+    </function>
+
+    <function>
+        <function-name>rightPadChar</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String rightPad(java.lang.String, int, char)</function-signature>
+    </function>
+
+    <function>
+        <function-name>rightPadString</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String rightPad(java.lang.String, int, java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>leftPad</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String leftPad(java.lang.String, int)</function-signature>
+    </function>
+
+    <function>
+        <function-name>leftPadChar</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String leftPad(java.lang.String, int, char)</function-signature>
+    </function>
+
+    <function>
+        <function-name>leftPadString</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String leftPad(java.lang.String, int, java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>center</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String center(java.lang.String, int)</function-signature>
+    </function>
+
+    <function>
+        <function-name>centerChar</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String center(java.lang.String, int, char)</function-signature>
+    </function>
+
+    <function>
+        <function-name>centerString</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String center(java.lang.String, int, java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>upperCase</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String upperCase(java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>lowerCase</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String lowerCase(java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>capitalize</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String capitalize(java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>uncapitalize</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String uncapitalize(java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>swapCase</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String swapCase(java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>countMatches</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>int countMatches(java.lang.String, java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>isAlpha</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>boolean isAlpha(java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>isAlphaSpace</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>boolean isAlphaSpace(java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>isAlphanumeric</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>boolean isAlphanumeric(java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>isAlphanumericSpace</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>boolean isAlphanumericSpace(java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>isAsciiPrintable</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>boolean isAsciiPrintable(java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>isNumeric</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>boolean isNumeric(java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>isNumericSpace</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>boolean isNumericSpace(java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>isWhitespace</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>boolean isWhitespace(java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>defaultString</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String defaultString(java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>defaultStringString</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String defaultString(java.lang.String, java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>defaultIfEmpty</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String defaultIfEmpty(java.lang.String, java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>reverse</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String reverse(java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>reverseDelimited</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String reverseDelimited(java.lang.String, char)</function-signature>
+    </function>
+
+    <function>
+        <function-name>abbreviate</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String abbreviate(java.lang.String, int)</function-signature>
+    </function>
+
+    <function>
+        <function-name>abbreviateOffset</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String abbreviate(java.lang.String, int, int)</function-signature>
+    </function>
+
+    <function>
+        <function-name>difference</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>java.lang.String difference(java.lang.String, java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>indexOfDifference</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>int indexOfDifference(java.lang.String, java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>getLevenshteinDistance</function-name>
+        <function-class>org.apache.commons.lang.StringUtils</function-class>
+        <function-signature>int getLevenshteinDistance(java.lang.String, java.lang.String)</function-signature>
+    </function>
+
+    <!-- As a bonus, also StringEscapeUtils -->
+
+    <function>
+        <function-name>escapeHtml</function-name>
+        <function-class>org.apache.commons.lang.StringEscapeUtils</function-class>
+        <function-signature>java.lang.String escapeHtml(java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>escapeJava</function-name>
+        <function-class>org.apache.commons.lang.StringEscapeUtils</function-class>
+        <function-signature>java.lang.String escapeJava(java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>escapeJavaScript</function-name>
+        <function-class>org.apache.commons.lang.StringEscapeUtils</function-class>
+        <function-signature>java.lang.String escapeJavaScript(java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>escapeSql</function-name>
+        <function-class>org.apache.commons.lang.StringEscapeUtils</function-class>
+        <function-signature>java.lang.String escapeSql(java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>escapeXml</function-name>
+        <function-class>org.apache.commons.lang.StringEscapeUtils</function-class>
+        <function-signature>java.lang.String escapeXml(java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>unescapeHtml</function-name>
+        <function-class>org.apache.commons.lang.StringEscapeUtils</function-class>
+        <function-signature>java.lang.String unescapeHtml(java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>unescapeJava</function-name>
+        <function-class>org.apache.commons.lang.StringEscapeUtils</function-class>
+        <function-signature>java.lang.String unescapeJava(java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>unescapeJavaScript</function-name>
+        <function-class>org.apache.commons.lang.StringEscapeUtils</function-class>
+        <function-signature>java.lang.String unescapeJavaScript(java.lang.String)</function-signature>
+    </function>
+
+    <function>
+        <function-name>unescapeXml</function-name>
+        <function-class>org.apache.commons.lang.StringEscapeUtils</function-class>
+        <function-signature>java.lang.String unescapeXml(java.lang.String)</function-signature>
+    </function>
+
+</facelet-taglib>
\ No newline at end of file

Modified: trunk/examples/wiki/src/etc/META-INF/wiki.taglib.xml
===================================================================
--- trunk/examples/wiki/src/etc/META-INF/wiki.taglib.xml	2008-03-10 15:30:09 UTC (rev 7521)
+++ trunk/examples/wiki/src/etc/META-INF/wiki.taglib.xml	2008-03-10 18:35:14 UTC (rev 7522)
@@ -115,6 +115,12 @@
     </function>
 
     <function>
+        <function-name>removeHtml</function-name>
+        <function-class>org.jboss.seam.wiki.util.WikiUtil</function-class>
+        <function-signature>java.lang.String removeHtml(java.lang.String)</function-signature>
+    </function>
+
+    <function>
         <function-name>disableFloats</function-name>
         <function-class>org.jboss.seam.wiki.util.WikiUtil</function-class>
         <function-signature>java.lang.String disableFloats(java.lang.String)</function-signature>

Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/FeedEntryManager.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/FeedEntryManager.java	2008-03-10 15:30:09 UTC (rev 7521)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/FeedEntryManager.java	2008-03-10 18:35:14 UTC (rev 7522)
@@ -52,13 +52,9 @@
                         + "</a>" : "[Broken Link]";
             }
 
-            // Preserve the macro that marks the end of the teaser
+            // Remove all macros
             public String renderMacro(WikiMacro macro) {
-                if (macro.getName().equals(FeedEntry.END_TEASER_MACRO)) {
-                    return FeedEntry.END_TEASER_MARKER;
-                } else {
-                    return "";
-                }
+                return "";
             }
         }
         parser.setRenderer( new FeedRenderer() );

Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/FeedEntry.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/FeedEntry.java	2008-03-10 15:30:09 UTC (rev 7521)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/FeedEntry.java	2008-03-10 18:35:14 UTC (rev 7522)
@@ -22,9 +22,6 @@
  */
 public class FeedEntry implements Serializable, Comparable {
 
-    public static final String END_TEASER_MACRO = "endTeaser";
-    public static final String END_TEASER_MARKER = "[<=endTeaser]";
-
     @Id
     @GeneratedValue(generator = "wikiSequenceGenerator")
     @Column(name = "FEEDENTRY_ID")
@@ -103,10 +100,6 @@
         this.titleSuffix = titleSuffix;
     }
 
-    public String getTitleStripped() {
-        return stripHTMLTags(title);
-    }
-
     public void setTitle(String title) {
         this.title = title;
     }
@@ -151,24 +144,6 @@
         this.descriptionValue = descriptionValue;
     }
 
-    public String getDescriptionValueStripped() {
-        return stripHTMLTags(getDescriptionValue());
-    }
-
-    public String getDescriptionValueStrippedNoNewlines() {
-        if (getDescriptionValue() == null) return null;
-        return stripHTMLTags(getDescriptionValue()).replaceAll("(\n|\r)", " ");
-    }
-
-    public boolean isTeaserMarkerPresent() {
-        return getDescriptionValueStripped() != null && getDescriptionValueStripped().contains(END_TEASER_MARKER);
-    }
-
-    public String getTeaserStripped() {
-        String stripped = getDescriptionValueStripped();
-        return isTeaserMarkerPresent() ? stripped.substring(0, stripped.indexOf(END_TEASER_MARKER)) : stripped;
-    }
-
     public int getReadAccessLevel() {
         return 0; // No restrictions
     }
@@ -202,10 +177,4 @@
         return "FeedEntry (" + getId() + ")";
     }
 
-    private String stripHTMLTags(String original) {
-        if (original == null) return null;
-        // Hm, that should be enough to make stuff XSS-safe?
-        return original.replaceAll("\\<([a-zA-Z]|/){1}?.*?\\>","");
-    }
-
 }

Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/util/WikiUtil.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/util/WikiUtil.java	2008-03-10 15:30:09 UTC (rev 7521)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/util/WikiUtil.java	2008-03-10 18:35:14 UTC (rev 7522)
@@ -196,6 +196,11 @@
         return sb.toString();
     }
 
+    public static String removeHtml(String original) {
+        if (original == null) return null;
+        return original.replaceAll("\\<([a-zA-Z]|/){1}?.*?\\>","");
+    }
+
     // TODO: Ouch...
     public static String removeMacros(String string) {
         if (string == null) return null;
@@ -270,17 +275,10 @@
         }
     }
 
-    /**
-     * Can't use col.size() in a value binding. Why can't I call arbitrary methods, even
-     * with arguments, in a value binding? Java needs properties badly.
-     */
+    // Some null-safe operations
     public static int sizeOf(Collection col) {
         return col == null ? 0 : col.size();
     }
-
-    /**
-     * EL doesn't support a String lenth() operator.
-     */
     public static int length(String string) {
         return string == null ? 0 : string.length();
     }

Modified: trunk/examples/wiki/view/includes/wikiTextEditor.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/wikiTextEditor.xhtml	2008-03-10 15:30:09 UTC (rev 7521)
+++ trunk/examples/wiki/view/includes/wikiTextEditor.xhtml	2008-03-10 18:35:14 UTC (rev 7522)
@@ -38,7 +38,7 @@
             <s:fragment rendered="#{not empty textPreviewId}">
                 <br/>
                 <h:outputText style="white-space:nowrap;"
-                              value="(#{valueMaxLength - wiki:length(valueBinding)} #{messages['lacewiki.label.wikiTextEditor.CharactersLeft']})"/>
+                              value="(#{valueMaxLength - valueBinding.length()} #{messages['lacewiki.label.wikiTextEditor.CharactersLeft']})"/>
             </s:fragment>
         </s:div>
 

Modified: trunk/examples/wiki/view/plugins/feedAggregator/plugin.xhtml
===================================================================
--- trunk/examples/wiki/view/plugins/feedAggregator/plugin.xhtml	2008-03-10 15:30:09 UTC (rev 7521)
+++ trunk/examples/wiki/view/plugins/feedAggregator/plugin.xhtml	2008-03-10 18:35:14 UTC (rev 7522)
@@ -5,6 +5,7 @@
        xmlns:a="https://ajax4jsf.dev.java.net/ajax"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:wiki="http://jboss.com/products/seam/wiki"
+       xmlns:stringutils="http://org.apache.commons.lang/StringUtils"
        xmlns:s="http://jboss.com/products/seam/taglib">
 
     <s:div styleClass="feedAggregator box">
@@ -69,18 +70,22 @@
                     <s:div styleClass="feedEntryTitle undecoratedLink"
                            rendered="#{not preferences.get('FeedAggregator', currentMacro).hideTitle}">
                         <h:outputLink target="_top" value="#{feDTO.feedEntry.link}">
-                            <h:outputText escape="false" value="#{wiki:escapeAtSymbol(feDTO.feedEntry.titleStripped)}"/>
+                            <h:outputText value="#{wiki:escapeAtSymbol(wiki:removeHtml(stringutils:unescapeHtml(feDTO.feedEntry.title)))}"/>
                         </h:outputLink>
                     </s:div>
 
                     <s:div styleClass="feedEntryBody" rendered="#{not preferences.get('FeedAggregator', currentMacro).hideDescription}">
-                        <h:outputText escape="false"
-                                      value="#{wiki:truncateStringOnWordBoundary(wiki:escapeAtSymbol(feDTO.feedEntry.descriptionValueStrippedNoNewlines),
-                                                                   preferences.get('FeedAggregator', currentMacro).truncateDescription)}"/>
+                        <h:outputText value="#{wiki:truncateStringOnWordBoundary(
+                                                wiki:escapeAtSymbol(
+                                                    wiki:removeHtml(
+                                                        stringutils:unescapeHtml(feDTO.feedEntry.descriptionValue)
+                                                    )
+                                                ),
+                                                preferences.get('FeedAggregator', currentMacro).truncateDescription)}"/>
 
                         <h:outputLink target="_top" styleClass="feedEntryBodyMoreLink"
                                       value="#{feDTO.feedEntry.link}"
-                                      rendered="#{wiki:length(feDTO.feedEntry.descriptionValueStrippedNoNewlines)
+                                      rendered="#{wiki:length(wiki:removeHtml(stringutils:unescapeHtml(feDTO.feedEntry.descriptionValue)))
                                                   > preferences.get('FeedAggregator', currentMacro).truncateDescription}">
                             &#160;#{messages['feedAggregator.label.More']}
                         </h:outputLink>

Modified: trunk/examples/wiki/view/plugins/feedTeasers/plugin.xhtml
===================================================================
--- trunk/examples/wiki/view/plugins/feedTeasers/plugin.xhtml	2008-03-10 15:30:09 UTC (rev 7521)
+++ trunk/examples/wiki/view/plugins/feedTeasers/plugin.xhtml	2008-03-10 18:35:14 UTC (rev 7522)
@@ -34,43 +34,27 @@
                             <h:outputText styleClass="teaserAuthor" value="#{fe.author}"/>
                         </s:span>
 
-                        <!-- TODO: Fix this somehow... it was an ugly hack anyway
-                        <s:div rendered="#{fe.document.enableComments and wiki:sizeOf(fe.document.comments) > 0}" styleClass="undecoratedLink">
-                            <h:outputLink target="_top" styleClass="feedTeaserComments" value="#{wikiURLRenderer.renderPermURL(fe.document)}#comments">
-                                #{wiki:sizeOf(fe.document.comments)}&#160;
-                                <h:outputText value="#{wiki:sizeOf(fe.document.comments)>1
-                                                     ? messages['lacewiki.label.commentsDisplay.Comments']
-                                                     : messages['lacewiki.label.commentsDisplay.Comment']}"/>
-                            </h:outputLink>
-                        </s:div>
-                        -->
                     </div>
 
                     <div class="teaserTitle undecoratedLink">
                         <h:outputLink target="_top" value="#{fe.link}">
-                            <h:outputText escape="false" value="#{fe.titleStripped}"/>
+                            <h:outputText value="#{wiki:removeHtml(fe.title)}"/>
                         </h:outputLink>
                     </div>
 
-                    <s:fragment rendered="#{fe.teaserMarkerPresent}">
-                        <h:outputText styleClass="teaserBody" value="#{fe.teaserStripped}"/>
-                        <h:outputLink target="_top" styleClass="teaserBody" value="#{fe.link}">
-                             &#160;#{messages['feedTeasers.label.More']}
-                         </h:outputLink>
-                    </s:fragment>
+                    <h:outputText styleClass="teaserBody"
+                                  value="#{wiki:truncateStringOnWordBoundary(
+                                            wiki:removeHtml(fe.descriptionValue),
+                                            preferences.get('FeedTeasers', currentMacro).truncateDescription
+                                          )}"/>
 
-                    <s:fragment rendered="#{not fe.teaserMarkerPresent}">
-                        <h:outputText styleClass="teaserBody"
-                                      value="#{wiki:truncateStringOnWordBoundary(fe.descriptionValueStripped, preferences.get('FeedTeasers', currentMacro).truncateDescription)}"/>
+                    <h:outputLink target="_top" styleClass="teaserBody"
+                                  value="#{fe.link}"
+                                  rendered="#{wiki:length(wiki:removeHtml(fe.descriptionValue))
+                                              > preferences.get('FeedTeasers', currentMacro).truncateDescription}">
+                        <h:outputText value="&#160;#{messages['feedTeasers.label.More']}"/>
+                    </h:outputLink>
 
-                        <h:outputLink target="_top" styleClass="teaserBody"
-                                      value="#{fe.link}"
-                                      rendered="#{wiki:length(fe.descriptionValueStripped) > preferences.get('FeedTeasers', currentMacro).truncateDescription}">
-                            &#160;#{messages['feedTeasers.label.More']}
-                        </h:outputLink>
-                    </s:fragment>
-
-
                 </h:column>
             </h:dataTable>
 

Modified: trunk/examples/wiki/view/themes/sfwkorg/css/sfwk.css
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/css/sfwk.css	2008-03-10 15:30:09 UTC (rev 7521)
+++ trunk/examples/wiki/view/themes/sfwkorg/css/sfwk.css	2008-03-10 18:35:14 UTC (rev 7522)
@@ -1396,7 +1396,7 @@
     color: #000;
     padding-left: 10px;
     padding-right: 10px;
-    padding-top: 0;
+    padding-top: 5px;
     padding-bottom: 5px;    
 }
 




More information about the seam-commits mailing list