includes/wikiengine/Tables.php
changeset 309 a1ccf990db6b
parent 166 d53cc29308f4
child 322 5f1cd51bf1be
equal deleted inserted replaced
308:e49604416b5a 309:a1ccf990db6b
   275 	 * Encode an attribute value for HTML output.
   275 	 * Encode an attribute value for HTML output.
   276 	 * @param $text
   276 	 * @param $text
   277 	 * @return HTML-encoded text fragment
   277 	 * @return HTML-encoded text fragment
   278 	 */
   278 	 */
   279 	function encodeAttribute( $text ) {
   279 	function encodeAttribute( $text ) {
       
   280     
       
   281     // In Enano 1.0.3, added this cheapo hack to keep ampersands
       
   282     // from being double-sanitized. Thanks to markybob from #deluge.
       
   283     $encValue = strtr( $text, array(
       
   284       '&' => '&'
       
   285     ) );
       
   286     
   280 		$encValue = htmlspecialchars( $text );
   287 		$encValue = htmlspecialchars( $text );
   281 		
   288 		
   282 		// Whitespace is normalized during attribute decoding,
   289 		// Whitespace is normalized during attribute decoding,
   283 		// so if we've been passed non-spaces we must encode them
   290 		// so if we've been passed non-spaces we must encode them
   284 		// ahead of time or they won't be preserved.
   291 		// ahead of time or they won't be preserved.