Index: trunk/wiki2xml/php/wiki2xml.php |
— | — | @@ -475,7 +475,8 @@ |
476 | 476 | $b-- ; |
477 | 477 | } |
478 | 478 | $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'/>" ; |
480 | 481 | else $xml .= $x ; |
481 | 482 | return true ; |
482 | 483 | } |
— | — | @@ -901,7 +902,7 @@ |
902 | 903 | # Parsing attributes |
903 | 904 | $ob = $b ; |
904 | 905 | $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] != '/' ) ) ) { |
906 | 907 | if ( $this->w[$b] == '"' || $this->w[$b] == "'" ) { |
907 | 908 | if ( $q == "" ) $q = $this->w[$b] ; |
908 | 909 | else if ( $this->w[$b] == $q ) $q = "" ; |