I suggest you ...

escape data on back end, eg. apostrophe in one's name

Hello,

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
...getElementById('authorFname2').value='D'Ann';window.opener.document.getElementBy…

Can you please escape such characters on the back end for any fields? (first name, last name, institution, bio, etc.)

Thanks,
Lisa

6 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    lisalisa shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    1 comment

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • Anonymous commented  ·   ·  Flag as inappropriate

        Hi Catalina,

        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.

        Thanks!

      Feedback and Knowledge Base