| Summary: | Formating of JavaScript corrupts source | ||
|---|---|---|---|
| Product: | [WebTools] JSDT | Reporter: | Terry Denney <terry.hon> |
| Component: | Web | Assignee: | Ian Tewksbury <itewksbu> |
| Status: | CLOSED DUPLICATE | QA Contact: | Nitin Dahyabhai <thatnitind> |
| Severity: | normal | ||
| Priority: | P3 | CC: | nsand.dev |
| Version: | 3.1 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | All | ||
| Whiteboard: | |||
*** This bug has been marked as a duplicate of bug 319855 *** |
Formating a HTML page with JavaScript having a html tags in a String corrupts the source. e.g. alert("<div></div>") results in alert("_$tag</div>") Reproduce with this simple html and execute "Source > Format" <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <script type="text/javascript"> alert("<div></div>") </script> </head> <body> </html> As a result the first '<div>' will be replaced with '_$tag'. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <script type="text/javascript"> alert("_$tag</div>") </script> </head> <body> </html> Every further execution will change the next tag too, so after two format executions, it will end as: alert("_$tag_$tag_")