]> gitweb.factorcode.org Git - factor.git/commitdiff
html.parser.util: removing incomplete html escaping.
authorJohn Benediktsson <mrjbq7@gmail.com>
Tue, 22 Apr 2014 02:03:48 +0000 (19:03 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Tue, 22 Apr 2014 02:03:48 +0000 (19:03 -0700)
extra/html/parser/utils/utils.factor

index c12ba74585b3d6adfa9595ad0b752126387b2c83..0b9474a7f1784cdc6c1a49664d162212244e3297 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2008 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: assocs kernel quoting sequences splitting ;
+USING: kernel quoting sequences splitting ;
 IN: html.parser.utils
 
 : trim1 ( seq ch -- newseq )
@@ -15,17 +15,3 @@ IN: html.parser.utils
     [ double-quote ] [ single-quote ] if ;
 
 : ?quote ( str -- newstr ) dup quoted? [ quote ] unless ;
-
-CONSTANT: html-entities H{
-    { "&quot;" "\"" }
-    { "&lt;" "<" }
-    { "&gt;" ">" }
-    { "&amp;" "&" }
-    { "&#39;" "'" }
-}
-
-: html-unescape ( str -- str' )
-    html-entities [ replace ] assoc-each ;
-
-: html-escape ( str -- str' )
-    html-entities [ swap replace ] assoc-each ;