aboutsummaryrefslogtreecommitdiffhomepage
path: root/plugins
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2015-12-22 10:24:31 +0100
committerArthurHoaro <arthur@hoa.ro>2015-12-22 10:59:41 +0100
commit49e62f22ad750d4d60936ec8437caee91809b179 (patch)
tree238d7d9996ce165f71f6a718ccd5a79457962388 /plugins
parent79851b489087f8a3027ecd805255cd13ee6fcf63 (diff)
downloadShaarli-49e62f22ad750d4d60936ec8437caee91809b179.tar.gz
Shaarli-49e62f22ad750d4d60936ec8437caee91809b179.tar.zst
Shaarli-49e62f22ad750d4d60936ec8437caee91809b179.zip
QRCode plugin: use url instead of real_url
Fixes #414 and avoid usage of redirector in QRCode. Also fixed a bug with URL encoding.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/qrcode/qrcode.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/qrcode/qrcode.php b/plugins/qrcode/qrcode.php
index 5f6e76a2..84a19618 100644
--- a/plugins/qrcode/qrcode.php
+++ b/plugins/qrcode/qrcode.php
@@ -17,7 +17,11 @@ 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['real_url'], $value['real_url'], PluginManager::$PLUGINS_PATH); 20 $qrcode = sprintf($qrcode_html,
21 urlencode($value['url']),
22 $value['url'],
23 PluginManager::$PLUGINS_PATH
24 );
21 $value['link_plugin'][] = $qrcode; 25 $value['link_plugin'][] = $qrcode;
22 } 26 }
23 27