OpenCageData / address-formatting

templates to format geographic addresses
MIT License
394 stars 84 forks source link

remove html escapes for generic23 #113

Closed laugehoyer closed 3 months ago

laugehoyer commented 3 months ago

It seems like a mistake to html-escape these fields.

E.g.

{
  house: "St. Judes & St. Pauls C of E (Va) Primary School",
  house_number: "10",
  road: "Kingsbury Road".
  city: "London",
  postcode: "N1 4AZ",
}

becomes

St. Judes & St. Pauls C of E (Va) Primary School
10 Kingsbury Road
London
N1 4AZ
freyfogle commented 3 months ago

Hi,

thanks for contributing.

You are right that htmlizing the & is unexpected and problematic. Thanks for making us aware.

I am not sure your change is the best solution, why would we do it only for generic23 and only for those fields? I think this may be an issue that should be deal with by the parsers. Let me mull for a bit (not least as am currently on holiday).

laugehoyer commented 3 months ago

For generic23, it seems like this was an oversight introduced back in 75135e3e79d71d7e0757f1fdc1dfe9e9918a23eb.

Otherwise the same thing can be seen in hamlet for BR and quarter for the fallback template of TC.

freyfogle commented 3 months ago

yes, just human error. Very wel spotted. I just checked in a fix for BR and TC