Instiki 0.16.6
Fix an incompatiblity between form_spam_protect and IE7. (Thanks to Jason Blevins) Roll a new version.
This commit is contained in:
parent
681065631c
commit
ec7141942b
3 changed files with 29 additions and 4 deletions
|
@ -69,7 +69,7 @@ module ActionView
|
|||
}
|
||||
]
|
||||
|
||||
kode = "var pos=document;while(pos.lastChild.nodeType==1)pos=pos.lastChild;var hiddenfield=document.createElement('input');hiddenfield.setAttribute('type','hidden');hiddenfield.setAttribute('name','_form_key');hiddenfield.setAttribute('value','"+form_key+"');pos.parentNode.appendChild(hiddenfield);"
|
||||
kode = "var pos=document.documentElement;while(pos && pos.lastChild && pos.lastChild.nodeType==1)pos=pos.lastChild;var hiddenfield=document.createElement('input');hiddenfield.setAttribute('type','hidden');hiddenfield.setAttribute('name','_form_key');hiddenfield.setAttribute('value','"+form_key+"');pos.parentNode.appendChild(hiddenfield);null;"
|
||||
|
||||
max_length = kode.length+1 unless max_length>kode.length
|
||||
|
||||
|
@ -82,8 +82,8 @@ module ActionView
|
|||
js = "var kode=\n"+js_wrap_quote(js_dbl_quote(kode),79)
|
||||
js = js+"\n;var i,c,x;while(eval(kode));"
|
||||
js = "function hivelogic_enkoder(){"+js+"}hivelogic_enkoder();"
|
||||
js = '<script type="text/javascript">'+"\n/* <![CDATA[ */\n"+js
|
||||
js = js+"\n/* ]]> */\n</script>\n"
|
||||
js = '<script type="text/javascript">'+"\n<!--//--><![CDATA[//><!--\n"+js
|
||||
js = js+"\n//--><!]]>\n</script>\n"
|
||||
result = js unless result.length>max_length
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue