Skip to content
Snippets Groups Projects
Commit e23a91cf authored by Reinhold Kainhofer's avatar Reinhold Kainhofer
Browse files

Version 2.1.3: Don't use htmlspecialchars on the description and the name, just on the rule name

Otherwise the description would not allow any HTML code any more...
parent c4dc3f19
No related branches found
No related tags found
No related merge requests found
BASE=rules_shipping BASE=rules_shipping
BASE_ADV=rules_shipping_advanced BASE_ADV=rules_shipping_advanced
PLUGINTYPE=vmshipment PLUGINTYPE=vmshipment
VERSION=2.1.2 VERSION=2.1.3
PLUGINFILES=$(BASE).php $(BASE)_base.php $(BASE).script.php $(BASE).xml index.html PLUGINFILES=$(BASE).php $(BASE)_base.php $(BASE).script.php $(BASE).xml index.html
PLUGINFILES_ADV=$(BASE_ADV).php $(BASE)_base.php $(BASE_ADV).script.php $(BASE_ADV).xml index.html PLUGINFILES_ADV=$(BASE_ADV).php $(BASE)_base.php $(BASE_ADV).script.php $(BASE_ADV).xml index.html
......
File added
File added
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<authorUrl>http://www.kainhofer.com</authorUrl> <authorUrl>http://www.kainhofer.com</authorUrl>
<copyright>Copyright (C) 2013, Reinhold Kainhofer</copyright> <copyright>Copyright (C) 2013, Reinhold Kainhofer</copyright>
<license>GPL v3+</license> <license>GPL v3+</license>
<version>2.1.2</version> <version>2.1.3</version>
<description>VMSHIPMENT_RULES_DESC</description> <description>VMSHIPMENT_RULES_DESC</description>
<files> <files>
<filename plugin="rules_shipping">rules_shipping.php</filename> <filename plugin="rules_shipping">rules_shipping.php</filename>
......
...@@ -277,6 +277,7 @@ class ShippingRule_Advanced extends ShippingRule { ...@@ -277,6 +277,7 @@ class ShippingRule_Advanced extends ShippingRule {
$this->shipping = $res; $this->shipping = $res;
$this->includes_tax = False; $this->includes_tax = False;
} }
// JFactory::getApplication()->enqueueMessage("<pre>Rule part '$rulepart' parsed into: ".print_r($res,1)."</pre>", 'error');
} }
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<authorUrl>http://www.kainhofer.com</authorUrl> <authorUrl>http://www.kainhofer.com</authorUrl>
<copyright>Copyright (C) 2013, Reinhold Kainhofer</copyright> <copyright>Copyright (C) 2013, Reinhold Kainhofer</copyright>
<license>GPL v3+</license> <license>GPL v3+</license>
<version>2.1.2</version> <version>2.1.3</version>
<description>VMSHIPMENT_RULES_ADV_DESC</description> <description>VMSHIPMENT_RULES_ADV_DESC</description>
<files> <files>
<filename plugin="rules_shipping_advanced">rules_shipping_advanced.php</filename> <filename plugin="rules_shipping_advanced">rules_shipping_advanced.php</filename>
......
...@@ -197,13 +197,13 @@ class plgVmShipmentRules_Shipping_Base extends vmPSPlugin { ...@@ -197,13 +197,13 @@ class plgVmShipmentRules_Shipping_Base extends vmPSPlugin {
$return = $this->displayLogos ($logos) . ' '; $return = $this->displayLogos ($logos) . ' ';
} }
if (!empty($plugin->$plugin_desc)) { if (!empty($plugin->$plugin_desc)) {
$description = '<span class="' . $this->_type . '_description">' . htmlspecialchars($plugin->$plugin_desc) . '</span>'; $description = '<span class="' . $this->_type . '_description">' . $plugin->$plugin_desc . '</span>';
} }
$rulename=''; $rulename='';
if (!empty($plugin->rule_name)) { if (!empty($plugin->rule_name)) {
$rulename=" (".htmlspecialchars($plugin->rule_name).")"; $rulename=" (".htmlspecialchars($plugin->rule_name).")";
} }
$pluginName = $return . '<span class="' . $this->_type . '_name">' . htmlspecialchars($plugin->$plugin_name) . $rulename.'</span>' . $description; $pluginName = $return . '<span class="' . $this->_type . '_name">' . $plugin->$plugin_name . $rulename.'</span>' . $description;
return $pluginName; return $pluginName;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment