includes/wikiengine/Tables.php
changeset 163 ad00dc1f8706
parent 142 ca9118d9c0f2
child 166 d53cc29308f4
equal deleted inserted replaced
162:e1a22031b5bd 163:ad00dc1f8706
   420   /**
   420   /**
   421 	 * @todo Document it a bit
   421 	 * @todo Document it a bit
   422 	 * @return array
   422 	 * @return array
   423 	 */
   423 	 */
   424 	function setupAttributeWhitelist() {
   424 	function setupAttributeWhitelist() {
       
   425     global $db, $session, $paths, $template, $plugins;
   425 		$common = array( 'id', 'class', 'lang', 'dir', 'title', 'style' );
   426 		$common = array( 'id', 'class', 'lang', 'dir', 'title', 'style' );
   426 		$block = array_merge( $common, array( 'align' ) );
   427 		$block = array_merge( $common, array( 'align' ) );
   427 		$tablealign = array( 'align', 'char', 'charoff', 'valign' );
   428 		$tablealign = array( 'align', 'char', 'charoff', 'valign' );
   428 		$tablecell = array( 'abbr',
   429 		$tablecell = array( 'abbr',
   429 		                    'axis',
   430 		                    'axis',
   568       'nodisplay'  => array(),
   569       'nodisplay'  => array(),
   569       
   570       
   570       # XHTML stuff
   571       # XHTML stuff
   571       'acronym'    => $common
   572       'acronym'    => $common
   572 			);
   573 			);
       
   574     
       
   575     // custom tags can be added by plugins
       
   576     $code = $plugins->setHook('html_attribute_whitelist');
       
   577     foreach ( $code as $cmd )
       
   578     {
       
   579       eval($cmd);
       
   580     }
       
   581     
   573 		return $whitelist;
   582 		return $whitelist;
   574 	}
   583 	}
   575   
   584   
   576   /**
   585   /**
   577 	 * Given a value escape it so that it can be used in an id attribute and
   586 	 * Given a value escape it so that it can be used in an id attribute and