Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unescaped xml character

My IDE (phpstorm) complains that this contains an Unescaped xml character. This has been bugging me for a while:

<? } if (isset($_GET[id])) { ?>
    document.getElementById("facebook_likebutton").innerHTML = '<';
<? } ?>

it marks the '<' as the part where its an error.

see this image:

enter image description here

like image 563
Kristian Rafteseth Avatar asked Dec 18 '14 15:12

Kristian Rafteseth


2 Answers

Change

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

to

<!DOCTYPE html>

and the error will be gone.

source

like image 78
phil294 Avatar answered Oct 08 '22 04:10

phil294


Change the inspection settings as follow:

  1. go to settings Ctrl+Alt+S
  2. go to Editor>Inspections>HTML
  3. uncheck Malformed content of "script" tag , or keep it checked and change the Severity (Red box) from Error to Warning or Weak Warning.
like image 45
Sam Avatar answered Oct 08 '22 05:10

Sam