From ea562b4177eee9f8a00ac9005b7a786d7370563e Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Tue, 4 Oct 2011 21:33:31 +0000 Subject: Restores XML entity fix. Did something eat some whitespace? I don't know. This is almost the same commit as r25783, but with different whitespace. No review. --- src/library/scala/xml/Utility.scala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/library/scala/xml/Utility.scala b/src/library/scala/xml/Utility.scala index 4d6712419c..9f230a7866 100644 --- a/src/library/scala/xml/Utility.scala +++ b/src/library/scala/xml/Utility.scala @@ -364,14 +364,14 @@ object Utility extends AnyRef with parsing.TokenTests { c = it.next } val ref = rfb.toString() - rfb.setLength(0) + rfb.clear() unescape(ref,sb) match { case null => - if (sb.length > 0) { // flush buffer + if (sb.length > 0) { // flush buffer nb += Text(sb.toString()) - sb.setLength(0) + sb.clear() } - nb += EntityRef(sb.toString()) // add entityref + nb += EntityRef(ref) // add entityref case _ => } } -- cgit v1.2.3