downforacross / downloadacross

chrome extension for downloading crosswords from various sources
4 stars 4 forks source link

Fix unescaping for NYT #10

Open stevenhao opened 4 years ago

stevenhao commented 4 years ago

Special chars, e.g. quote marks, seem to be incorrectly unescaped for various puzzles. Will post a repro here next time I see it happen.

stevenhao commented 4 years ago

Here's nyt200401.

��ACROSS&DOWN��������������������������������L����CLAY.ITEM.SWEDELOGO.CARA.WANEDAREYOUKIDDINGMEWIDOW.ENDUP.ION...SLIT..FERN..REB.INHALF.VENIATLAST.MOE.IRESWHOTHEHELLKNOWSENOS.NON.BOGOTARODE.TUSCAN.MOD..SARI..AGIN...BAT.HOPON.CABLEIHAVENTGOTACLUEGEIST.ARLO.HILLAMNOT.SEAN.OPUS---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------NY Times Wednesday, April 1, 2020�John Ficarra and Patrick Merrell�NY Times2020�French Open court material�End of a hammer�Greiner of "Shark Tank"�Like GruyËre or Grandpa�Idiots�One thing ... or a twosome�R.N.'s workplace�What the Lord sometimes does, in a classical expression�Land o' leprechauns�Sober-minded org.�Alfred Nobel or Anders Celsius�Criticism that might be made behind someone's back�Ashen�Scotty's domain on the U.S.S. Enterprise�Brief how-to�Where fruit-picking originated?�McDonald's arches, e.g.�Model/actress Delevingne�Ebbed�Historic town in VeszprÈm county, Hungary, noted for its baroque architecture�Wise-looking�Gym clothes holder�Short line at the top of a column, in typesetting�Turn out�+ or - atom�Thigh-baring dress feature�Aim�Spore-producing plant�Enjoying the great outdoors ... indoors�Soldier clad in gray, for short�Less cooked�Prefix with -centric�Laundry problem for Dracula?�Bisected�Chorus of approval�"Hahaha"�Start of Caesar's boast�Unfamiliar with�Feels down�"It's about time!"�Where icebergs are found�A Stooge�Fits of anger�Left tributary of the Vitim River in Irkutsk Oblast, Russia�The Rockets, on scoreboards�Classic camera brand�Only ape to orbit the earth (1961)�___ sequitur�Colombia's capital�Went by taxi or train�From Florence or Pisa�Cooking oil option�Like a 1960s-'70s TV "squad"�One-size-fits-all garment�Butler of fame�Opposed to, rurally�Kind of chip�PiÒata smasher�Nickname for major-league baseball's Angel Stadium, with "the"�"Uh ... excuse me"�Board a moving vehicle�Some fund-raising grps.�People eater�Part of a suspension bridge�Sonar signal�Doozy�Serpentine swimmers�Village between Kruszyna and JackÛw in Silesian Voivodeship, Poland (pop. 305)�Letters on a brandy bottle�Bridge limit unit�TV newsman Willie�Janis's partner in the comics�Knoll�Retort to "Are too!"�One of the Lennons�Numbered composition�NY Times2020�

stevenhao commented 4 years ago

From stackoverflow, https://stackoverflow.com/questions/7394748/whats-the-right-way-to-decode-a-string-that-has-special-html-entities-in-it/7394787#7394787

function decodeHtml(html) {
    var txt = document.createElement("textarea");
    txt.innerHTML = html;
    return txt.value;
}