I think it ensures that the text contained inside is misinformed so that the java script cannot be injected into the page
so if you have
userdata = alert ("textstring") <%= userdata %>
a message appears on the page
<%: userdata %>
will display a text warning ("textstring") '
source share