NateWr / business-profile

WordPress plugin to display your business's contact details with seo-friendly Schema.org markup.
34 stars 16 forks source link

Seems to fix issue with the address passed to Google when getting directions. #82

Open LowellMontgomery opened 6 years ago

LowellMontgomery commented 6 years ago

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.

LowellMontgomery commented 6 years ago

This is what I was getting prior to my "fix":

Illustration of the error with get directions
LowellMontgomery commented 6 years ago

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).