• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

special characters must be escaped

New Here ,
Mar 25, 2021 Mar 25, 2021

Copy link to clipboard

Copied

I cannot get my head around what seems to be a simple problem. Dreamweaver keeps getting an error code for "special characters must be escaped" for these two lines of code:

 

/* If the ball is about to go off screen horizontally, reverse
* the direction of the ball */
if ( x < 0 || x > 290)
dx = -dx;
/* If the ball is about to go off screen vertically, reverse
* the direction of the ball */
if ( y < 0 || y > 305)
dy =- dy;

 

It keeps marking the error where the comparisson operators "<" and the ">"  are used. Any ideas?

Views

196

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 25, 2021 Mar 25, 2021

Copy link to clipboard

Copied

Have a look on the right side of your post,

BenPleysier_0-1616728560457.png

In particular:

https://community.adobe.com/t5/dreamweaver/error-special-characters-must-be-escaped-lt-php-on-dreamw...

 

Wappler, the only real Dreamweaver alternative.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 25, 2021 Mar 25, 2021

Copy link to clipboard

Copied

Thank you Ben for your quick reply! 

I had already read all other posts regarding this similar issue. From what I have read, most folks have issues with unclosed statements, php, and others. Mine simply does not allow me to use the two comparison operators, without flagging the line for an error and allowing me to continue.

 

I went to the W3Schools site and it provides some clues about using “escape characters” using strings in JavaScript, but… as these two comparison operators “< >” are not used with strings inside “quotation marks” rather by using just numbers, and it is the reason why I cannot tell what Dreamweaver is suggesting to fix.

 

PS. The file is an HTML document.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 26, 2021 Mar 26, 2021

Copy link to clipboard

Copied

LATEST

I don't get any validation errors with the code you've posted, when placed within <script> tags in the <head> of a new .html page.

 

Could you copy and paste the entire code of the page here in the forum?

That particular error usually doesn't have much to do with the line it appears on. Normally, there will be a problem earlier in your code that's confusing the linting tool, and DW finally gives up at the line that gets highlighted.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines