From 70fd2ebf52672ed4711dbdb344bd99cead7ccc96 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Mon, 21 Apr 2014 19:03:48 -0700 Subject: [PATCH] html.parser.util: removing incomplete html escaping. --- extra/html/parser/utils/utils.factor | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/extra/html/parser/utils/utils.factor b/extra/html/parser/utils/utils.factor index c12ba74585..0b9474a7f1 100644 --- a/extra/html/parser/utils/utils.factor +++ b/extra/html/parser/utils/utils.factor @@ -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{ - { """ "\"" } - { "<" "<" } - { ">" ">" } - { "&" "&" } - { "'" "'" } -} - -: html-unescape ( str -- str' ) - html-entities [ replace ] assoc-each ; - -: html-escape ( str -- str' ) - html-entities [ swap replace ] assoc-each ; -- 2.34.1