主题: html 被错误的过滤掉
作者: 美好时光, 发布日期: 2014-08-07 16:01:50, 浏览数: 1657

<embed name="_vPlayer" src="http://v.cen.ce.cn/images/video_player_new.swf?josn=http%3A//v.cen.ce.cn/video_info/2014-8-6/1407311675375.json&" quality="high" width="553" height="450" align="middle" allowscriptaccess="always" allowfullscreen="true" type="application/x-shockwave-flash" />


以上是添加的代码,在加粗的代码中, 双斜杠"//"会被过滤成单斜杠"/",目前我找到简单的解决办法。

function _formatUrl(url, mode, host, pathname) {
	mode = _undef(mode, '').toLowerCase();
	if (url.substr(0, 5) != 'data:') {
		//url = url.replace(/([^:])\/\//g, '$1/');  //注释原因:会过滤掉某些 // 变成一个
	}
	if (_inArray(mode, ['absolute', 'relative', 'domain']) < 0) {
		return url;
	}
	host = host || location.protocol + '//' + location.host;
	if (pathname === undefined) {
		var m = location.pathname.match(/^(\/.*)\//);
		pathname = m ? m[1] : '';
	}
发表新帖 发表回复