admin管理员组

文章数量:1184941

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:

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:

Share Improve this question edited Dec 18, 2014 at 16:19 Kristian Rafteseth asked Dec 18, 2014 at 15:53 Kristian RaftesethKristian Rafteseth 2,0326 gold badges29 silver badges47 bronze badges 1
  • 2 Speculation: It doesn't like you use of deprecated short open tags for PHP: <? should be <?php. – Quentin Commented Dec 18, 2014 at 15:56
Add a comment  | 

3 Answers 3

Reset to default 22

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

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.

the simple answer was that it didnt like having a < sign inside the <script> tag

本文标签: javascriptUnescaped xml characterStack Overflow