From 49e62f22ad750d4d60936ec8437caee91809b179 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Tue, 22 Dec 2015 10:24:31 +0100 Subject: QRCode plugin: use url instead of real_url Fixes #414 and avoid usage of redirector in QRCode. Also fixed a bug with URL encoding. --- plugins/qrcode/qrcode.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'plugins/qrcode/qrcode.php') 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) $qrcode_html = file_get_contents(PluginManager::$PLUGINS_PATH . '/qrcode/qrcode.html'); foreach ($data['links'] as &$value) { - $qrcode = sprintf($qrcode_html, $value['real_url'], $value['real_url'], PluginManager::$PLUGINS_PATH); + $qrcode = sprintf($qrcode_html, + urlencode($value['url']), + $value['url'], + PluginManager::$PLUGINS_PATH + ); $value['link_plugin'][] = $qrcode; } -- cgit v1.2.3