add some notes for later
This commit is contained in:
@@ -164,6 +164,16 @@ define([
|
|||||||
send scripts over the wire.
|
send scripts over the wire.
|
||||||
*/
|
*/
|
||||||
if (['addAttribute', 'modifyAttribute'].indexOf(info.diff.action) !== -1) {
|
if (['addAttribute', 'modifyAttribute'].indexOf(info.diff.action) !== -1) {
|
||||||
|
if (info.diff.name === 'href') {
|
||||||
|
// console.log(info.diff);
|
||||||
|
var href = info.diff.newValue;
|
||||||
|
|
||||||
|
// TODO normalize HTML entities
|
||||||
|
if (/javascript *: */.test(info.diff.newValue)) {
|
||||||
|
// TODO remove javascript: links
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (/^on/.test(info.diff.name)) {
|
if (/^on/.test(info.diff.name)) {
|
||||||
console.log("Rejecting forbidden element attribute with name (%s)", info.diff.name);
|
console.log("Rejecting forbidden element attribute with name (%s)", info.diff.name);
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user