<٪
Response.write (server.htmlencode (fiximg ("<imgonclick =" "if (this.width> screen.width-461) الرياح OW.Open ('QQ/20082181405371.JPG') ؛ "" alt = "" "" "الحدود =" "0" "src =" qq/20082181405371.jpg "/>"))))))
٪>
<٪
'功能: 将 img 代码格式化为 <imgsrc = "xxx"/> 格式.
FunctionFiximg (SSTRING)
Dimsreallydo ، Regex ، ايرليو
dimomatches ، cmatch
DimTstartTime ، Tendtime
Ifisnull (Sstring) ثم
fiximg = ""
exitfunction
Endif
sreallydo = sstring
onerrorresumenext
sreallydo = استبدال (sreallydo ، vbcr ، "")
sreallydo = استبدال (sreallydo ، vblf ، "")
sreallydo = استبدال (sreallydo ، vbtab ، "")
sreallydo = استبدال (sreallydo ، "<img" ، vbcrlf & "<img" ، 1 ، -1،1)
sreallydo = استبدال (sreallydo ، "/>" ، "/>" ، 1 ، -1،1)
sreallydo = replaceall (sreallydo ، "=" ، "=" ، true)
sreallydo = replaceall (sreallydo ، ">" ، ">" ، صحيح)
sreallydo = استبدال (sreallydo ، "> <" ، ">" & vbcrlf & "<")
sreallydo = trim (sreallydo)
onerrorgoto0
setRegex = NewRegexp
regex.ignorecase = صحيح
regex.global = صحيح
'// 去除 onclick ، onload 等脚本
regex.pattern = "/s [on].+؟ = ([/" "| /'2010)(.*؟)/ 1"
sreallydo = regex.replace (sreallydo ، "")
'// 将 src 不带引号的图片地址加上引号
regex.pattern = "<img.*؟/ssrc = ([^/" "/'/s] [^/" "/'/s>]*).*؟>"
sreallydo = regex.replace (sreallydo ، "<imgsrc =" "$ 1" "/>")
'// 正则匹配图片 src 地址
regex.pattern = "<img.*؟/ssrc = ([/" "/']) ([^/" "/']+؟)/1.*؟>"
sreallydo = regex.replace (sreallydo ، "<imgsrc =" "$ 2" "/>")
fiximg = sreallydo
الوظيفية