Index: /FCKeditor.Java/branches/2.5-test/java-core/src/main/java/net/fckeditor/FCKeditor.java
===================================================================
--- /FCKeditor.Java/branches/2.5-test/java-core/src/main/java/net/fckeditor/FCKeditor.java	(revision 2578)
+++ /FCKeditor.Java/branches/2.5-test/java-core/src/main/java/net/fckeditor/FCKeditor.java	(revision 2579)
@@ -204,17 +204,38 @@
 	 */
 	private String escapeXml(String str) {
-		if (Utils.isEmpty(str))
-			return str;
-
-		/*
-		 * TODO Strings are inefficient. It should be done like in Commons Lang
-		 * 2.4 StringUtils#replaceEach(String, String[], String[])
-		 */
-		str = str.replaceAll("&", "&amp;");
-		str = str.replaceAll("<", "&lt;");
-		str = str.replaceAll(">", "&gt;");
-		str = str.replaceAll("\"", "&quot;");
-		str = str.replaceAll("'", "&#39;");
-		return str;
+
+		StringBuffer sb = new StringBuffer();
+
+		int len = str.length();
+		char c;
+		
+		for (int i = 0; i < len; i++) {
+			
+			c = str.charAt(i);
+			switch (c) {
+			case '&':
+				sb.append("&amp;");
+				break;
+			case '<':
+				sb.append("&lt;");
+				break;
+			case '>':
+				sb.append("&gt;");
+				break;
+			case '"':
+				sb.append("&quot;");
+				break;
+			// XML actually defines &apos; as entity for the apostrophe but we
+			// user rather the numerical reference to avoid XHTML 1.0 validation problems
+			case '\'':
+				sb.append("&#39;");
+				break;
+			default:
+				sb.append(c);
+				break;
+			}
+		}
+
+		return sb.toString();
 	}
 
Index: /FCKeditor.Java/branches/2.5-test/java-core/src/main/resources/META-INF/FCKeditor.tld
===================================================================
--- /FCKeditor.Java/branches/2.5-test/java-core/src/main/resources/META-INF/FCKeditor.tld	(revision 2578)
+++ /FCKeditor.Java/branches/2.5-test/java-core/src/main/resources/META-INF/FCKeditor.tld	(revision 2579)
@@ -11,5 +11,5 @@
 	</description>
 	<display-name>FCKeditor Tag Library</display-name>
-	<tlib-version>2.4</tlib-version>
+	<tlib-version>2.5</tlib-version>
 	<short-name>FCK</short-name>
 	<uri>http://java.fckeditor.net</uri>
@@ -61,6 +61,6 @@
 			<description>
 				The path/folder in which the editor is deployed under
-				the given context. The context path will be attached
-				automatically. (e.g. '/fckeditor')
+				the given context (e.g. '/fckeditor'). The context path will be
+				attached automatically.
 			</description>
 			<name>basePath</name>
Index: /FCKeditor.Java/branches/2.5-test/pom.xml
===================================================================
--- /FCKeditor.Java/branches/2.5-test/pom.xml	(revision 2578)
+++ /FCKeditor.Java/branches/2.5-test/pom.xml	(revision 2579)
@@ -18,5 +18,5 @@
 			UTF-8
 		</project.reporting.outputEncoding>
-		<slf4j.version>1.5.2</slf4j.version>
+		<slf4j.version>[1.5.4,1.6)</slf4j.version>
 
 		<!-- site plugin properties for Velocity -->
Index: /FCKeditor.Java/branches/2.5-test/src/changes/changes.xml
===================================================================
--- /FCKeditor.Java/branches/2.5-test/src/changes/changes.xml	(revision 2578)
+++ /FCKeditor.Java/branches/2.5-test/src/changes/changes.xml	(revision 2579)
@@ -16,8 +16,8 @@
 			<action type="update" issue="2583">ConnectorServlet#init fails on some application servers</action>
 			<action type="add" issue="2592">Add more logging statements</action>
-			
+			<action type="update" issue="2605">Move escapeXml method to a StringBuffer</action>
 			
 		</release>
-		<release version="2.4.1" date="2008-10-15"
+		<release version="2.4.1" date="2008-10-12"
 			description="Minor bugfixes and enhancements.">
 			<action dev="mosipov" type="fix" issue="2355">FCK:editor output is not XHTML 1.0 compliant</action>
