Joined June 2014
·

Noitidart

San Jose, CA
·
·

Posted to Safe vs Unsafe jQuery Methods over 1 year ago

Can you please show an example of the XSS safe DOM insertion. Would it be:

jQuery('<div/>', {
    id: 'foo',
    href: 'http://google.com',
    title: 'Become a Googler',
    rel: 'external',
    text: 'Go to Google!'
}).appendTo('#mySelector');

?

Thank you

Posted to Safe vs Unsafe jQuery Methods over 1 year ago

Superb post, thank you for this!

Achievements
35 Karma
533 Total ProTip Views