Skip to content

Commit

Permalink
MDL-59125 filter_urltolink: respect nolink span, unittest
Browse files Browse the repository at this point in the history
  • Loading branch information
marinaglancy committed Jun 16, 2017
1 parent 2a477bf commit 450d15d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions filter/urltolink/tests/filter_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,9 @@ function get_convert_urls_into_links_test_cases() {
'<link rel="search" type="application/opensearchdescription+xml" href="/osd.jsp" title="Peer review - Moodle Tracker"/>' => '<link rel="search" type="application/opensearchdescription+xml" href="/osd.jsp" title="Peer review - Moodle Tracker"/>',
'<a href="https://docs.moodle.org/dev/Main_Page"></a><span>www.google.com</span><span class="placeholder"></span>' => '<a href="https://docs.moodle.org/dev/Main_Page"></a><span><a href="http://www.google.com" class="_blanktarget">www.google.com</a></span><span class="placeholder"></span>',
'http://nolandforzombies.com <a href="zombiesFTW.com">Zombies FTW</a> http://aliens.org' => '<a href="http://nolandforzombies.com" class="_blanktarget">http://nolandforzombies.com</a> <a href="zombiesFTW.com">Zombies FTW</a> <a href="http://aliens.org" class="_blanktarget">http://aliens.org</a>',
// Test 'nolink' class.
'URL: <span class="nolink">http://moodle.org</span>' => 'URL: <span class="nolink">http://moodle.org</span>',
'<span class="nolink">URL: http://moodle.org</span>' => '<span class="nolink">URL: http://moodle.org</span>',
//URLs in Javascript. Commented out as part of MDL-21183
//'var url="http://moodle.org";'=>'var url="http://moodle.org";',
//'var url = "http://moodle.org";'=>'var url = "http://moodle.org";',
Expand Down

0 comments on commit 450d15d

Please sign in to comment.