Skip to content

Commit

Permalink
ignoreTags tests for linkifyHtml
Browse files Browse the repository at this point in the history
  • Loading branch information
nfrasser committed Apr 17, 2016
1 parent c854e75 commit 0ecd737
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion test/spec/linkify-html-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ describe('linkify-html', function () {
href += '?subject=Hello%20from%20Linkify';
}
return href;
}
},
ignoreTags: [
'script',
'style'
]
},

// For each element in this array
Expand Down Expand Up @@ -49,6 +53,10 @@ describe('linkify-html', function () {
'Unterminated anchor tag <a href="http://google.com"> This <em>is a link google.com</em> and this works!! https://reddit.com/r/photography/',
'Unterminated anchor tag <a href="http://google.com"> This <em>is a link google.com</em> and this works!! https://reddit.com/r/photography/',
'Unterminated anchor tag <a href="http://google.com"> This <em>is a link google.com</em> and this works!! https://reddit.com/r/photography/'
], [
'Ignore tags like <script>var a = {}; a.ca = "Hello";</script> and <style>b.com {color: blue;}</style>',
'Ignore tags like <script>var a = {}; <a href="http://a.ca" class="linkified" target="_blank">a.ca</a> = "Hello";</script> and <style><a href="http://b.com" class="linkified" target="_blank">b.com</a> {color: blue;}</style>',
'Ignore tags like <script>var a = {}; a.ca = "Hello";</script> and <style>b.com {color: blue;}</style>'
]
];

Expand Down

0 comments on commit 0ecd737

Please # to comment.