r14535 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r14534‎ | r14535 | r14536 >
Date:07:01, 2 June 2006
Author:magnusmanske
Status:old
Tags:
Comment:
bugfixes
Modified paths:
  • /trunk/wiki2xml/php/wiki2xml.php (modified) (history)

Diff [purge]

Index: trunk/wiki2xml/php/wiki2xml.php
@@ -475,7 +475,8 @@
476476 $b-- ;
477477 }
478478 $a = $b ;
479 - if ( $mark ) $xml .= "<link type='external' href='{$x}'/>" ;
 479+ $x = htmlspecialchars ( $x , ENT_QUOTES ) ;
 480+ if ( $mark ) $xml .= "<link type='external' href='$x'/>" ;
480481 else $xml .= $x ;
481482 return true ;
482483 }
@@ -901,7 +902,7 @@
902903 # Parsing attributes
903904 $ob = $b ;
904905 $q = "" ;
905 - while ( $q != "" || ( $b < $this->wl && $this->w[$b] != '>' && $this->w[$b] != '/' ) ) {
 906+ while ( $b < $this->wl && ( $q != "" || ( $this->w[$b] != '>' && $this->w[$b] != '/' ) ) ) {
906907 if ( $this->w[$b] == '"' || $this->w[$b] == "'" ) {
907908 if ( $q == "" ) $q = $this->w[$b] ;
908909 else if ( $this->w[$b] == $q ) $q = "" ;

Status & tagging log