Skip to content

Commit 526aa19

Browse files
author
dorgan@donaldorgan.com
committed
tweaking attributes of allowed tags
1 parent 63077dd commit 526aa19

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

clib/bootstrap-wysiwyg/bootstrap-wysihtml5.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,9 +382,18 @@
382382
"h3": {},
383383
"blockquote": {},
384384
"u": 1,
385-
"img": {},
385+
"img": {
386+
check_attributes: {
387+
src: "any",
388+
width: "any",
389+
alt: "any",
390+
border: "numbers"
391+
}
392+
},
386393
"a": {
387394
check_attributes: {
395+
title: "any",
396+
target: "any",
388397
href: "url" // important to avoid XSS
389398
}
390399
},

clib/bootstrap-wysiwyg/wysihtml5-0.3.0.min.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5050,6 +5050,11 @@ wysihtml5.dom.parse = (function() {
50505050

50515051
// ------------ attribute checks ------------ \\
50525052
var attributeCheckMethods = {
5053+
any: (function() {
5054+
return function(attributeValue) {
5055+
return attributeValue;
5056+
}
5057+
})(),
50535058
url: (function() {
50545059
var REG_EXP = /^https?:\/\//i;
50555060
return function(attributeValue) {

0 commit comments

Comments
 (0)