From df2c2598361f186f8a00e35b6f665f693998bccd Mon Sep 17 00:00:00 2001 From: Jason Taylor Date: Mon, 14 Jul 2014 17:43:38 -0700 Subject: [PATCH] BUGFIX: exception validating 'data-' attributes --- app/assets/javascripts/discourse/lib/markdown.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/lib/markdown.js b/app/assets/javascripts/discourse/lib/markdown.js index 1f9ab3cd369..cee428cad32 100644 --- a/app/assets/javascripts/discourse/lib/markdown.js +++ b/app/assets/javascripts/discourse/lib/markdown.js @@ -28,7 +28,7 @@ function validateAttribute(tagName, attribName, value) { // data-* attributes if (tag) { var allowed = tag[attribName] || tag['data-*']; - if (allowed === value || allowed.indexOf('*') !== -1) { return value; } + if (allowed && (allowed === value || allowed.indexOf('*') !== -1)) { return value; } } }