• Resolved mawill

    (@mawill)


    How can i handle a Link (URL) in a JSON field?

    Example: "description": "Instrument configuration (<a href=\"https://example.com\manuals\manual" target=\"_blank\">download</a>) <br /><br />Important documents:<ul><li>measurement protocol / <a href=\"https://example.com/files/2UwdGF84c/view\" target=\"_blank\">Messprotokoll</a> <br /><br />Some random text ..."

    Link in the rendered field content looks now like this: https://mysite/%22https://example.com//files/2UwdGF84c/view\

    • This topic was modified 10 months, 3 weeks ago by mawill.
    • This topic was modified 10 months, 3 weeks ago by mawill.
    • This topic was modified 10 months, 3 weeks ago by mawill.
    • This topic was modified 10 months, 3 weeks ago by mawill.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter mawill

    (@mawill)

    EDIT
    JSON field from API (1 backslash was missing):
    "description": "Instrument configuration (<a href=\"https://example.com\manuals\manual\" target=\"_blank\">download</a>) <br /><br />Important documents:<ul><li>measurement protocol / <a href=\"https://example.com/files/2UwdGF84c/view\" target=\"_blank\">Messprotokoll</a> <br /><br />Some random text ..."

    https://jsoneditoronline.org shows:
    description:Instrument configuration (download)

    • This reply was modified 10 months, 3 weeks ago by mawill.
    Plugin Author berkux

    (@berkux)

    Hi,
    can you post the URL to the JSON?
    ” and \ are a bit tricky in JSON.
    Try {description:purejsondata} and https://example.com/manuals/manual/\"

    Bernhard

    Thread Starter mawill

    (@mawill)

    {description:purejsondata} did the trick.
    Many thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘URL in JSON field’ is closed to new replies.