Index: trunk/phase3/includes/api/ApiMain.php |
— | — | @@ -325,7 +325,7 @@ |
326 | 326 | * not break. */ |
327 | 327 | $params = $this->extractRequestParams(); |
328 | 328 | $printer->setUnescapeAmps ( $this->mAction == 'help' |
329 | | - && $params['format'] = ApiMain::API_DEFAULT_FORMAT ); |
| 329 | + && $params['format'] == ApiMain::API_DEFAULT_FORMAT ); |
330 | 330 | |
331 | 331 | $printer->execute(); |
332 | 332 | $printer->closePrinter(); |
Index: trunk/phase3/includes/api/ApiFormatBase.php |
— | — | @@ -173,11 +173,12 @@ |
174 | 174 | // Escape everything first for full coverage |
175 | 175 | $text = htmlspecialchars($text); |
176 | 176 | |
177 | | - /* Temporary fix for bad links in help messages. As a special case, ampersands |
178 | | - * are not escaped in the help message. Should be removed once we have completed |
179 | | - * a fully-html version of the help message. */ |
| 177 | + /* Temporary fix for bad links in help messages. As a special case, XML-escaped |
| 178 | + * ampersands are de-escaped one level in the help message for legibility. |
| 179 | + * Should be removed once we have completed a fully-html version of the |
| 180 | + * help message. */ |
180 | 181 | if ( $this->mUnescapeAmps ) |
181 | | - $text = ereg_replace ( '&', '&', $text ); |
| 182 | + $text = str_replace( '&', '&', $text ); |
182 | 183 | |
183 | 184 | // encode all comments or tags as safe blue strings |
184 | 185 | $text = preg_replace('/\<(!--.*?--|.*?)\>/', '<span style="color:blue;"><\1></span>', $text); |