summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmil Stjerneman2013-01-15 22:36:39 (GMT)
committerEmil Stjerneman2013-01-15 22:36:39 (GMT)
commitaab32f843641763da4273137add14a58c98be782 (patch)
tree762b1e061c62d3b1c616b985e792aa2e1616a73a
parentcc5502709c2f56636badcde0e7bc570f43604737 (diff)
Use build in clear functions for tokens that is not replaced instead of regexp.
-rw-r--r--plugins/linkit_plugins/linkit-plugin-entity.class.php5
-rw-r--r--plugins/plugin.class.php5
2 files changed, 2 insertions, 8 deletions
diff --git a/plugins/linkit_plugins/linkit-plugin-entity.class.php b/plugins/linkit_plugins/linkit-plugin-entity.class.php
index e4fa678..c5349d0 100644
--- a/plugins/linkit_plugins/linkit-plugin-entity.class.php
+++ b/plugins/linkit_plugins/linkit-plugin-entity.class.php
@@ -104,10 +104,7 @@ class LinkitPluginEntity extends LinkitPlugin {
function buildDescription($data) {
$description = token_replace(check_plain($this->conf['result_description']), array(
$this->plugin['entity_type'] => $data,
- ));
-
- // Hide tokens that still haven't been replaced.
- $description = preg_replace('/\[[^\s\[\]:]*:[^\s\[\]]*\]/x', '', $description);
+ ), array('clear' => TRUE));
return $description;
}
diff --git a/plugins/plugin.class.php b/plugins/plugin.class.php
index 30154b1..e3479e1 100644
--- a/plugins/plugin.class.php
+++ b/plugins/plugin.class.php
@@ -92,10 +92,7 @@ abstract class LinkitPlugin implements LinkitPluginInterface {
if (isset($this->profile->data[$this->plugin['name']]['result_description'])) {
$description = token_replace(check_plain($this->profile->data[$this->plugin['name']]['result_description']), array(
$this->plugin_name => $data,
- ));
-
- // Hide tokens that still haven't been replaced.
- $description = preg_replace('/\[[^\s\[\]:]*:[^\s\[\]]*\]/x', '', $description);
+ ), array('clear' => TRUE));
return $description;
}
}