MediaWiki REL1_33
PhpBugTests.php
Go to the documentation of this file.
1<?php
33 private $parsedData = '';
34 public $ok = false;
35
36 public function __construct() {
37 $charData = '<b>c</b>';
38 $xml = '<a>' . htmlspecialchars( $charData ) . '</a>';
39
41 xml_set_character_data_handler( $parser, [ $this, 'chardata' ] );
42 $parsedOk = xml_parse( $parser, $xml, true );
43 $this->ok = $parsedOk && ( $this->parsedData == $charData );
44 }
45
46 public function chardata( $parser, $data ) {
47 $this->parsedData .= $data;
48 }
49}
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
Test for PHP+libxml2 bug which breaks XML input subtly with certain versions.
chardata( $parser, $data)
see documentation in includes Linker php for Linker::makeImageLink or false for current used if you return false $parser
Definition hooks.txt:1834
$data
Utility to generate mapping file used in mw.Title (phpCharToUpper.json)