esme-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vdic...@apache.org
Subject svn commit: r918616 - /incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/Message.scala
Date Wed, 03 Mar 2010 18:27:12 GMT
Author: vdichev
Date: Wed Mar  3 18:27:12 2010
New Revision: 918616

URL: http://svn.apache.org/viewvc?rev=918616&view=rev
Log:
Fixed replacement bug by quoting replacement string.

Modified:
    incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/Message.scala

Modified: incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/Message.scala
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/Message.scala?rev=918616&r1=918615&r2=918616&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/Message.scala (original)
+++ incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/Message.scala Wed Mar
 3 18:27:12 2010
@@ -29,6 +29,8 @@
 
 import scala.xml._
 
+import java.util.regex.Matcher
+
 import org.compass.annotations._
 import bootstrap.liftweb.Compass.compass
 import org.compass.core._
@@ -293,7 +295,8 @@
 
   private[model] object text extends MappedText(this){
     override lazy val asJsExp =
-      JE.Str(is.replaceFirst("(?<=<body>).*(?=</body>)", digestedXHTML.mkString))
+      JE.Str(is.replaceFirst("(?<=<body>).*(?=</body>)",
+                             Matcher.quoteReplacement(digestedXHTML.mkString)))
   }
 
   object when extends MappedLong(this) {



Mime
View raw message