Search code examples
jsonhtml-escape-characters

json file does not show string inside "< >", on the webpage (eg. "abc <endpoint>")


< , > are not considered as escape characters. But when i need to write a script inside a String (eg.) " ....... " json code screenshot the corresponding string is not displayed properly on the jaggery webpage, it is displayed as follows viewed on the webpage. where as it should be displayed as follows how it should show on the jaggery webpage


Solution

  • if you insert the text as innerHTML then the tags are interpreted as html tags and are not shown. you might find your answer here