@@ -139,6 +139,14 @@ function __construct ($htmlsax) {
139139 $ this ->State [StateInterface::STATE_PI ] = new PiState ();
140140 $ this ->State [StateInterface::STATE_JASP ] = new JaspState ();
141141 $ this ->State [StateInterface::STATE_ESCAPE ] = new EscapeState ();
142+
143+ $ this ->parser_options ['XML_OPTION_TRIM_DATA_NODES ' ] = 0 ;
144+ $ this ->parser_options ['XML_OPTION_CASE_FOLDING ' ] = 0 ;
145+ $ this ->parser_options ['XML_OPTION_LINEFEED_BREAK ' ] = 0 ;
146+ $ this ->parser_options ['XML_OPTION_TAB_BREAK ' ] = 0 ;
147+ $ this ->parser_options ['XML_OPTION_ENTITIES_PARSED ' ] = 0 ;
148+ $ this ->parser_options ['XML_OPTION_ENTITIES_UNPARSED ' ] = 0 ;
149+ $ this ->parser_options ['XML_OPTION_STRIP_ESCAPES ' ] = 0 ;
142150 }
143151
144152 /**
@@ -187,22 +195,28 @@ function scanUntilString($string) {
187195 }
188196
189197 /**
190- * Returns a string from the current position until the first instance of
191- * one of the characters in the supplied string argument
192- * @param string string to search until
193- * @access protected
194- * @return string
195- * @abstract
196- */
197- function scanUntilCharacters ($ string ) {}
198+ * Returns a string from the current position until the first instance of
199+ * one of the characters in the supplied string argument.
200+ * @param string string to search until
201+ * @access protected
202+ * @return string
203+ */
204+ function scanUntilCharacters ($ string ) {
205+ $ startpos = $ this ->position ;
206+ $ length = strcspn ($ this ->rawtext , $ string , $ startpos );
207+ $ this ->position += $ length ;
208+ return substr ($ this ->rawtext , $ startpos , $ length );
209+ }
198210
199211 /**
200212 * Moves the position forward past any whitespace characters
201213 * @access protected
202214 * @return void
203215 * @abstract
204216 */
205- function ignoreWhitespace () {}
217+ function ignoreWhitespace () {
218+ $ this ->position += strspn ($ this ->rawtext , " \n\r\t" , $ this ->position );
219+ }
206220
207221 /**
208222 * Begins the parsing operation, setting up any decorators, depending on
0 commit comments