Open LowellMontgomery opened 6 years ago
This is what I was getting prior to my "fix":
But actually, I think my change only fixes one of the links. I think it's still possible to still get the error by clicking the other link. (There are links by both the map and the address, depending on config). I need to look at this again and fix the second (and maybe properly create an "issue" for this).
Encoding a business with an apostrophe in the name put ' in the search field, so it seems urlencode() is not appropriate here and esc_attr() does not seem to be necessary here, either. After this change, I correctly get directions instead of an error. I think I would get an error even without the apostrophe since I think the esc_attr was removing separations for the address lines, which now correctly appear as commas.