includes/wikiengine/Tables.php
changeset 229 97ae8e9d5e29
parent 166 d53cc29308f4
child 309 a1ccf990db6b
equal deleted inserted replaced
147:d8156d18ac58 229:97ae8e9d5e29
     1 <?php
     1 <?php
     2 
     2 
     3 /**
     3 /*
     4  * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
     4  * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
     5  * Version 1.0.2 (Coblynau)
     5  * Version 1.1.1
     6  * Copyright (C) 2006-2007 Dan Fuhry
     6  * Copyright (C) 2006-2007 Dan Fuhry
     7  *
     7  *
     8  * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
     8  * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
     9  * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
     9  * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
    10  *
    10  *
   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