| Новости | FAQ | Авторы | Документация | В действии | Библиотека |
| Инструменты | Полезные ссылки | Хостинги | Скачать | Примеры | Форум |
Pavel Zagrebelin 23.12.2003 07:00
вот код:@main[]
<html>
<script charset="windows-1251" type="text/javascript">
function test(){
location.href="test2.html?name="+escape(document.forms['first'].elements[0].value);
}
</script>
<body>
<form name="first" accept-charset="windows-1251">
<input name="name" type="text" value="фыва">
<input type="button" value="push me" onclick="test()">
</form>
</body>
</html>
<hr>
<dl>
^form:fields.foreach[field;value]{
<dt>$field
<dd>
^if($value eq ""){empty!}{
^if($value is string){$value}{
^if($value is table){^$value is table}
}}
}
</dl>Собственно, я вышел из положения, написав my_escape() такого вида: function my_escape(str){
str=str.replace(/ /g, "^taint[uri][ ]")^;
str=str.replace(/&/g, "^taint[uri][&]")^;
str=str.replace(/\+/g, "^taint[uri][+]")^;
return str^;
}