InstantTranslate: JSON Parse Error in the frontend if a language resource contains a backslash

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • None
    • Affects Version/s: None
    • Component/s: InstantTranslate

      problem

      1. Create a language resource containing a "\" backslash in it. In my case it was C:\fakepath\filename
      2. Load InstantTranslate. The JSON containing the above name can not be parsed in the Browser. Jsonlint.com instead validates the JSON without problems, thats strange.

      error message in JS

      10:49:24.618 VM2191:1 Uncaught SyntaxError: Unexpected token p in JSON at position 7674
      at JSON.parse (<anonymous>)
      at instanttranslate:64

       

      Affected part of the JSON (the token p points to the p in fakepath):

      {"id":"71","name":"C:\\fakepath
      pagingtest-en-de","source":["en"],"sourceIso":["eng"],"targe

       

            Assignee:
            Aleksandar Mitrev
            Reporter:
            Thomas Lauria
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: