Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
TSP Posted June 9, 2015 Posted June 9, 2015 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 ); }
TSP Posted June 27, 2015 Author Posted June 27, 2015 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.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.