escape data on back end, eg. apostrophe in one's name
We are having problem passing data back to our site, because there's an apostrophe in the user's name (D'Ann Finley), this making it think it's end of statement. We are getting the following error:
SyntaxError: missing ; before statement
Can you please escape such characters on the back end for any fields? (first name, last name, institution, bio, etc.)
We’ve resolved this issue. But rather than using a search to find and get authors name, we encourage integrations to use the ORCID API to authenticate users.
We are using json when searching for users. We select the user we want which will then populate back onto our site, and thus the "getElementById(‘authorFname2’)" that you saw. But in this case if you search for "Finley" (last name), one of the results is "D'Ann Finley". That's who we want and the apostrophe in her name is breaking the code and there looks to be no way to escape it on our end.