dimanche 8 mars 2015

Escaping Embedded HTML Tags

Does anyone know of an easy way to escape embedded HTML tags in JavaScript? I am writing a program that deals with user's notes. I need the note content to escape embedded HTML tags like it is done in the title of the note.


this is the code where I set the title and the content of the note:



-for(i=0; i<userNotes.lenght; i++)
li
div
b=userNotes[I].title+":"
-var note_url = "/edit/"+userNotes[i]._id
a(href=note_url)[edit]
p!=userNotes[i].contents

Aucun commentaire:

Enregistrer un commentaire