Codebreaker 2bc08752a0894eb2c7afb345286e391d

16Sep/050

How to disable HTML code?

The following code will replace with <tag> instead of removing tags which are not allowed.

wp-includes/kses.php

[code lang="php"] " character if (!preg_match('%^<\s*(/\s*)?([a-zA-Z0-9]+)([^>]*)>?$%', $string, $matches)) return ''; # It's seriously malformed $slash = trim($matches[1]); $elem = $matches[2]; $attrlist = $matches[3]; if (!is_array($allowed_html[strtolower($elem)])) return "<$elem$attrlist>"; # They are using a not allowed HTML element return wp_kses_attr("$slash$elem", $attrlist, $allowed_html, $allowed_protocols); } # function wp_kses_split2 ?> [/code]

Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


No trackbacks yet.