Special Characters Must Be Escaped - using EJS


#1

How does people get around this warning? I tried to change the open and close characters but my application won’t recognize them either so partials will not work.

var ejs = require('ejs'); 
ejs.open = '{{'; 
ejs.close = '}}';

#2

What warning are you seeing?


#3

In order to avoid the warning below I am trying to swtich “<%” and “%>” for “{{” and “}}” respectively. However that is not working.


#4

Yeah i get this warning too, it doesn’t actually break anything but its really annoying and can lead to people just ignoring all editor errors. It seems to treat .ejs files as just normal HTML files.


#5

I changed the editor so that it doesn’t try to lint .ejs files. If you refresh, the annoying warnings will go away.