Jump to content

Any particular reason you use HtmlPurifier twice during rebuild


TSP

Recommended Posts

Posted

When the legacyParser rebuilds earlier posts half of the time is spent by HtmlPurifier in two calls that are made in system/Text/parser.php. 

Any particular issues that've caused you to do this? 

Do you consider both calls really necessary?

	public function parse( $value )
	{
		/* HTMLPurifier - remove bad stuff and make sure HTML is well formed */
		if ( $this->htmlPurifier !== NULL )
		{
			$value = $this->htmlPurifier->purify( $value );
		}
		...
		/* HTMLPurifier again, to catch anything bad from bbcodes */
		if ( $this->htmlPurifier !== NULL )
		{
			$value = $this->htmlPurifier->purify( $value );
		}

 

  • 3 weeks later...
Posted

Any comments on this? It spends at least half the rebuild time on running the two instances of HTMLPurifier::purify(). Maybe there is a point in one of them, but it still seems weird to have it be two times. 

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...