[webkit-dev] accessing forms using document."form-name". causes crash in XHTML file

Deshpande, Raghavendra raghavendra.deshpande at philips.com
Thu Nov 20 01:57:01 PST 2008


Hi All,


  I have pasted the test content below.

If this content is present in a .xhtml file, the webkit crashes. (Verified in

Safari on Win XP with latest nightly, and in Chrome - It crashes there too.)



But, if the same content is served in a .html file, It works fine.



I am afraid, the XHTML content <--> JS bindings have serious issues in webkit.



I have filed this as a bug in https://bugs.webkit.org/show_bug.cgi?id=22378



Any suggestions/patches to get it working in .xhtml ??





Here's the test content:

-------------------------------

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE html PUBLIC

"-//W3C//DTD XHTML 1.0 Transitional//EN"

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>

<meta http-equiv="content-type" content="application/xhtml+xml;

charset=UTF-8"/>

<title>Form access </title>

</head>

<body

style="background-color:white;border-left:0px;border-top:0px;overflow:hidden;"

>

<form name="MyForm" method="POST" action="about:blank">

<input type="hidden" name="name" value=""></input>

</form>



<script type="text/javascript">

document.MyForm.name.value="test";

document.MyForm.setAttribute("action","about:blank");

document.MyForm.submit();

</script>

</body>

</html>

------------------------------------------------------------------

Raghavendra Deshpande



________________________________
The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20081120/4b8be541/attachment.html>


More information about the webkit-dev mailing list