Skip to content

Commit

Permalink
Change optimise regex pattern :closes: #6910
Browse files Browse the repository at this point in the history
  • Loading branch information
Khadreal committed Aug 27, 2024
1 parent fb50ef3 commit 2d56935
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function optimize( string $html, $row ): string {
* @return string
*/
private function remove_hashes( $html ) {
$result = preg_replace( '/data-rocket-location-hash="(?:.*)"/i', '', $html );
$result = preg_replace( '/data-rocket-location-hash="[^"]*"/i', '', $html );

if ( null === $result ) {
return $html;
Expand Down

0 comments on commit 2d56935

Please sign in to comment.