? a.out
Index: htmlparse.tcl
===================================================================
RCS file: /cvsroot/tcllib/tcllib/modules/htmlparse/htmlparse.tcl,v
retrieving revision 1.13
diff -u -r1.13 htmlparse.tcl
--- htmlparse.tcl	24 Oct 2003 19:39:36 -0000	1.13
+++ htmlparse.tcl	16 Dec 2003 21:19:54 -0000
@@ -378,7 +378,7 @@
     # Protect characters special to tcl (braces, slashes) by
     # converting them to their escape sequences.
 
-    return [string map [list "\{" "&ob;" "\}" "&cb;" "\\\\" "&bsl;"] $html]
+    return [string map [list "\{" "&ob;" "\}" "&cb;" "\\" "&bsl;"] $html]
 }
 
 
Index: htmlparse.test
===================================================================
RCS file: /cvsroot/tcllib/tcllib/modules/htmlparse/htmlparse.test,v
retrieving revision 1.3
diff -u -r1.3 htmlparse.test
--- htmlparse.test	15 Aug 2003 03:51:30 -0000	1.3
+++ htmlparse.test	16 Dec 2003 21:19:54 -0000
@@ -252,6 +252,17 @@
     set tx
 } {{0 root} {1 head} {2 title} {3 PCDATA} {1 body} {2 h2} {3 PCDATA} {3 p} {4 PCDATA} {3 p}}
 
+# Bug #861277
+test htmlparse-6.1 {Backslashes in content} {
+    set tags [list]
+    htmlparse::parse -cmd cb -vroot html "<p>\\</p>"
+    set tags
+} [list \
+    [list html  {} {} {}] \
+    [list p     {} {} {&bsl;}] \
+    [list p     /  {} {}] \
+    [list html  /  {} {}] ]
+
 
 # Take a look at the cache.
 #parray ::htmlparse::splitdata
