diff options
author | ArthurHoaro <arthur@hoa.ro> | 2015-09-18 13:26:36 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2015-11-26 20:14:38 +0100 |
commit | 90e5bd65c9d4a5d3d5cedfeaa1314f2a15df5227 (patch) | |
tree | 7a085b9aecaa92aa5076df01df78c39edd2acff5 /tests/plugins | |
parent | 986afb752bc57271e76935da9ed2df6ef8713cb7 (diff) | |
download | Shaarli-90e5bd65c9d4a5d3d5cedfeaa1314f2a15df5227.tar.gz Shaarli-90e5bd65c9d4a5d3d5cedfeaa1314f2a15df5227.tar.zst Shaarli-90e5bd65c9d4a5d3d5cedfeaa1314f2a15df5227.zip |
URL encode links when a redirector is set.
Fixes #328 - URL encode links when a redirector is set
* WARNING - template edit - new variable available : "real_url"
Contains the final real url (redirected or any other change on original URL)
* Don't redirect shaares link in RSS/Atom.
* Affects links shaared in description.
* Move text2clickable and keepMultipleSpaces to Utils.php + unit test
UPDATE:
* keepMultipleSpaces renamed to space2nbsp
* space2nbsp improved to handle single space at line beginning
* links in text description aren't 'nofollow' anymore
Diffstat (limited to 'tests/plugins')
-rw-r--r-- | tests/plugins/PlugQrcodeTest.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/plugins/PlugQrcodeTest.php b/tests/plugins/PlugQrcodeTest.php index 86dc7f29..c749fa86 100644 --- a/tests/plugins/PlugQrcodeTest.php +++ b/tests/plugins/PlugQrcodeTest.php | |||
@@ -30,7 +30,7 @@ class PlugQrcodeTest extends PHPUnit_Framework_TestCase | |||
30 | 'title' => $str, | 30 | 'title' => $str, |
31 | 'links' => array( | 31 | 'links' => array( |
32 | array( | 32 | array( |
33 | 'url' => $str, | 33 | 'real_url' => $str, |
34 | ) | 34 | ) |
35 | ) | 35 | ) |
36 | ); | 36 | ); |
@@ -39,7 +39,7 @@ class PlugQrcodeTest extends PHPUnit_Framework_TestCase | |||
39 | $link = $data['links'][0]; | 39 | $link = $data['links'][0]; |
40 | // data shouldn't be altered | 40 | // data shouldn't be altered |
41 | $this->assertEquals($str, $data['title']); | 41 | $this->assertEquals($str, $data['title']); |
42 | $this->assertEquals($str, $link['url']); | 42 | $this->assertEquals($str, $link['real_url']); |
43 | 43 | ||
44 | // plugin data | 44 | // plugin data |
45 | $this->assertEquals(1, count($link['link_plugin'])); | 45 | $this->assertEquals(1, count($link['link_plugin'])); |