diff --git a/extra/xkcd/xkcd.factor b/extra/xkcd/xkcd.factor index 0c55bfb119..e6c356daae 100644 --- a/extra/xkcd/xkcd.factor +++ b/extra/xkcd/xkcd.factor @@ -1,11 +1,11 @@ ! Copyright (C) 2011 John Benediktsson ! See http://factorcode.org/license.txt for BSD license -USING: accessors formatting html.parser html.parser.analyzer -html.parser.printer http.client images.http images.viewer -images.viewer.prettyprint io io.streams.string kernel parser -prettyprint.custom prettyprint.sections regexp sequences strings -ui wrap.strings ; +USING: accessors formatting html.entities html.parser +html.parser.analyzer html.parser.printer http.client images.http +images.viewer images.viewer.prettyprint io io.streams.string +kernel parser prettyprint.custom prettyprint.sections regexp +sequences strings ui wrap.strings ; IN: xkcd @@ -22,7 +22,8 @@ IN: xkcd : comic-text ( url -- string ) http-get nip parse-html "transcript" find-by-id-between - [ html-text. ] with-string-writer ; + [ html-text. ] with-string-writer + html-unescape ; : comic-text. ( url -- ) comic-text 80 wrap-string print ;