s...@ull.at
unread,Jun 2, 2014, 3:32:14 AM6/2/14Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ullrigh...@googlegroups.com
Author: klemens
Date: 2014-06-02 09:32:12 +0200 (Mon, 02 Jun 2014)
New Revision: 4105
Modified:
trunk/plugins/ullCorePlugin/lib/form/widget/ullMetaWidgetContentElements.class.php
trunk/plugins/ullCorePlugin/modules/ullWidget/templates/_ullContentElementHtml.php
Log:
ullCms: content elements: fixed meta info cleaning
Modified: trunk/plugins/ullCorePlugin/lib/form/widget/ullMetaWidgetContentElements.class.php
===================================================================
--- trunk/plugins/ullCorePlugin/lib/form/widget/ullMetaWidgetContentElements.class.php 2014-06-02 06:48:00 UTC (rev 4104)
+++ trunk/plugins/ullCorePlugin/lib/form/widget/ullMetaWidgetContentElements.class.php 2014-06-02 07:32:12 UTC (rev 4105)
@@ -29,11 +29,31 @@
/**
* Cleans the input hidden tag with content elements meta information
- * @param unknown_type $string
+ * @param string $html
*/
- public static function cleanMetaInfo($string)
+ public static function cleanMetaInfo($html)
{
- return ullHTMLPurifier::removeInputTags($string);
+ require_once sfConfig::get('sf_plugins_dir') .
+ '/ullCorePlugin/lib/vendor/SimpleHtmlDom/simple_html_dom.php';
+
+ $dom = str_get_html(
+ $html,
+ null,
+ null,
+ null,
+ false // Preserve newlines
+ );
+
+ $elements = $dom->find('input.content_element_data');
+
+ foreach ($elements as &$element)
+ {
+ $element->outertext = ''; // delete tag
+ }
+
+ $html = $dom->__toString();
+
+ return $html;
}
}
\ No newline at end of file
Modified: trunk/plugins/ullCorePlugin/modules/ullWidget/templates/_ullContentElementHtml.php
===================================================================
--- trunk/plugins/ullCorePlugin/modules/ullWidget/templates/_ullContentElementHtml.php 2014-06-02 06:48:00 UTC (rev 4104)
+++ trunk/plugins/ullCorePlugin/modules/ullWidget/templates/_ullContentElementHtml.php 2014-06-02 07:32:12 UTC (rev 4105)
@@ -26,7 +26,10 @@
<?php echo input_hidden_tag(
'content_element_data_' . $element_id,
$json,
- array('id' => 'content_element_data_' . $element_id)
+ array(
+ 'id' => 'content_element_data_' . $element_id,
+ 'class' => 'content_element_data',
+ )
) ?>
<?php endif ?>