Changeset 16420
- Timestamp:
- 05/21/08 11:34:41 (5 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/MidCOM_2_8/midcom.helper.datamanager2/config/config.inc
r14808 r16420 22 22 */ 23 23 'DefinitionID' => 'DM2 Default definition set', 24 'DefinitionRev' => 1,24 'DefinitionRev' => 2, 25 25 /* NOTE: You must use transitional doctype if you want to use <a name> (see html_purify_HTMLDefinition below) */ 26 26 'Doctype' => 'XHTML 1.0 Transitional', 27 27 'TidyLevel' => 'light', 28 'EnableAttrID' => true,29 28 ), 30 29 'Attr' => array … … 37 36 '_top', 38 37 ), 38 'EnableID' => true, 39 39 ), 40 40 'Cache' => array 41 41 ( 42 42 'SerializerPath' => $GLOBALS['midcom_config']['cache_base_directory'] . 'htmlpurifier', 43 /* Disable cache while testing 44 'DefinitionImpl' => null, 45 */ 43 46 ), 44 /* do not cache definitions while testing45 'Core' => array46 (47 'DefinitionCache' => null,48 ),49 */50 47 ), 51 48 'html_purify_HTMLDefinition' => array branches/MidCOM_2_8/midcom.helper.datamanager2/type/text.php
r16399 r16420 99 99 function purify_content() 100 100 { 101 if ( isset($this->purify_config['Cache']['SerializerPath'])101 if ( isset($this->purify_config['Cache']['SerializerPath']) 102 102 && !file_exists($this->purify_config['Cache']['SerializerPath'])) 103 103 { … … 109 109 error_reporting(E_ALL); 110 110 111 $purifier = new HTMLPurifier($this->purify_config); 112 111 $pufifier_config_object = HTMLPurifier_Config::createDefault(); 112 $pufifier_config_object->loadArray($this->purify_config); 113 113 114 // Set local IDPrefix to field name... 114 $pu rifier->config->set('Attr', 'IDPrefixLocal', "{$this->name}_");115 $pufifier_config_object->set('Attr', 'IDPrefixLocal', "{$this->name}_"); 115 116 116 117 // Load custom element/attribute definitions … … 119 120 && !empty($config_defs)) 120 121 { 121 $def =& $pu rifier->config->getHTMLDefinition(true);122 $def =& $pufifier_config_object->getHTMLDefinition(true); 122 123 if ( isset($config_defs['addAttribute']) 123 124 && is_array($config_defs['addAttribute']) … … 148 149 } 149 150 151 $purifier = new HTMLPurifier($pufifier_config_object); 152 150 153 /* 151 154 echo "DEBUG: value before\n<pre>\n"; … … 154 157 */ 155 158 159 // FIXME figure out why this always tries to put something to the default cache dir (it does put stuff to the defined one as well) 156 160 $this->value = $purifier->purify($this->value); 157 161
