You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure if I'm using this correctly, but commaListsAnd returns undefined values when using function format.
consttags=require("common-tags");constbar=["one","two","three"];console.log("1.",tags.commaListsAnd`${bar}`);// 1. one, two and threeconsole.log("2.",tags.commaListsAnd(bar));// 2. oneundefinedtwoundefinedthree
constsomeUnsafeString=`<a href="script:alert('ok, computer')"> Some link </a>`;console.log("3.",tags.safeHtml`${someUnsafeString}`);console.log("4.",tags.safeHtml(someUnsafeString));
OUTPUT
3. <a href="script:alert('ok, computer')"> Some link </a>
4. <a href="script:alert('ok, computer')">
Some link
</a>
The text was updated successfully, but these errors were encountered:
Not sure if I'm using this correctly, but
commaListsAnd
returns undefined values when using function format.I saw https://github.com/zspecza/common-tags#using-tags-on-regular-string-literals and wasn't sure if that worked w/ all tags, or just certain ones. I also tried w/
safeHtml()
and got unexpected results, so I'm sure this might just be user error:OUTPUT
The text was updated successfully, but these errors were encountered: