html.entities: switch to using re-replace-with.

db4
John Benediktsson 2014-05-18 13:48:35 -07:00
parent 8e4ce647d3
commit 0b390cc6f2
1 changed files with 2 additions and 7 deletions

View File

@ -2341,10 +2341,5 @@ R/ &(#[0-9]+|#[xX][0-9a-fA-F]+|[^\t\n\f <&#;]{1,32});?/
PRIVATE>
:: html-unescape ( str -- newstr )
[
0 str re-charref [
drop [ [ str subseq , ] keep 1 + ] dip
[ str subseq replace-charref , ] keep
] each-match str length str subseq ,
] { } make concat ;
: html-unescape ( str -- newstr )
re-charref [ rest replace-charref ] re-replace-with ;