aboutsummaryrefslogtreecommitdiffhomepage
path: root/plugins/qrcode/qrcode.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2015-09-18 13:26:36 +0200
committerArthurHoaro <arthur@hoa.ro>2015-11-26 20:14:38 +0100
commit90e5bd65c9d4a5d3d5cedfeaa1314f2a15df5227 (patch)
tree7a085b9aecaa92aa5076df01df78c39edd2acff5 /plugins/qrcode/qrcode.php
parent986afb752bc57271e76935da9ed2df6ef8713cb7 (diff)
downloadShaarli-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 'plugins/qrcode/qrcode.php')
-rw-r--r--plugins/qrcode/qrcode.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/qrcode/qrcode.php b/plugins/qrcode/qrcode.php
index 1080c964..5f6e76a2 100644
--- a/plugins/qrcode/qrcode.php
+++ b/plugins/qrcode/qrcode.php
@@ -17,7 +17,7 @@ function hook_qrcode_render_linklist($data)
17 $qrcode_html = file_get_contents(PluginManager::$PLUGINS_PATH . '/qrcode/qrcode.html'); 17 $qrcode_html = file_get_contents(PluginManager::$PLUGINS_PATH . '/qrcode/qrcode.html');
18 18
19 foreach ($data['links'] as &$value) { 19 foreach ($data['links'] as &$value) {
20 $qrcode = sprintf($qrcode_html, $value['url'], $value['url'], PluginManager::$PLUGINS_PATH); 20 $qrcode = sprintf($qrcode_html, $value['real_url'], $value['real_url'], PluginManager::$PLUGINS_PATH);
21 $value['link_plugin'][] = $qrcode; 21 $value['link_plugin'][] = $qrcode;
22 } 22 }
23 23