bp_strip_script_and_style_tags( string $string )

Remove script and style tags from a string.

Parameters Parameters


(string) (Required) The string to strip tags from.

Top ↑

Return Return

(string) The stripped tags string.

Source Source

File: bp-core/bp-core-functions.php

function bp_strip_script_and_style_tags( $string ) {
	return preg_replace( '@<(script|style)[^>]*?>.*?</\\1>@si', '', $string );

Top ↑

Changelog Changelog

Version Description
3.0.1 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.