use clean_url() instead of attribute_escape() when dealing with src/href to protect against XSS. props xknown. fixes #3986 for trunk.

git-svn-id: https://develop.svn.wordpress.org/trunk@5056 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith
2007-03-17 08:46:59 +00:00
parent 4926111056
commit d8336eed5c
18 changed files with 39 additions and 38 deletions

View File

@@ -150,7 +150,7 @@ class WP_Scripts {
$ver .= '&' . $this->args[$handle];
$src = 0 === strpos($this->scripts[$handle]->src, 'http://') ? $this->scripts[$handle]->src : get_option( 'siteurl' ) . $this->scripts[$handle]->src;
$src = add_query_arg('ver', $ver, $src);
$src = attribute_escape(apply_filters( 'script_loader_src', $src ));
$src = clean_url(apply_filters( 'script_loader_src', $src ));
echo "<script type='text/javascript' src='$src'></script>\n";
$this->print_scripts_l10n( $handle );
}