Special Characters must be escaped php,dreamweaver,wordpress widget

Special Characters must be escaped php,dreamweaver,wordpress widgetPHP,WORDPRESS,DREAMWEAVER ERROR

Four character entity references deserve special mention since they are frequently used to escape special characters:

  • “&lt;” represents the < sign.
  • “&gt;” represents the > sign.
  • “&amp;” represents the & sign.
  • “&quot; represents the ” mark.

Let’s take an example of a sitelink search box:

< script type=”application/ld+json”>

{

“@context”: “http://schema.org”,

“@type”: “WebSite”,

“url”: “https://www.akonnor.com/”,

“potentialAction”: {

“@type”: “SearchAction”,

“target”: “https://query.akonnor.com/search?q={search_term_string}”,

“query-input”: “required name=search_term_string”

}

}

< /script>

These when coded will give 4 error message or special characters must be escaped.

The correct code should be this

“&lt;”script type=application/ld+json“&gt;”
{
“@context”: “http://schema.org”,
“@type”: “WebSite”,
“url”: “https://www.akonnor.com/”,
“potentialAction”: {
“@type”: “SearchAction”,
“target”: “https://query.akonnor.com/search?q={search_term_string}”,
“query-input”: “required name=search_term_string”
}
}
“&lt;” /script“&gt;”