MantisBT - NetSurf
View Issue Details
0002572NetSurfJavascriptpublic2017-11-01 11:582019-07-19 09:30
Reporterandreymal 
Assigned ToDaniel Silverstone 
PrioritynormalSeveritymajorReproducibilityhave not tried
StatusclosedResolutionfixed 
Platformamd64OSUbuntuOS Version16.04
Product Version3.7 
Target Version3.9Fixed in Version3.9 
Fixed in CI build #4622
Reported in CI build #
URL of problem pagehttps://andreymal.org/files/netsurfjsbug/case2.html
Summary0002572: Strange javascript problem: some "random" .js files are not working and they breaks other scripts
DescriptionExample:

1) Create HTML page that links to .js file, e.g. <script src="test.js"></script>
2) Create test.js with this content: document.write('!');
3) Open this HTML page using NetSurf with enabled JS.

Online example: https://andreymal.org/files/netsurfjsbug/case1.html

This works.

But...

4) Replace test.js with this content: document.write('!!');

(yes, just add one more character in string)

And this NOT works! (attached log netsurfjs37bug.txt; line 411 - 35.395481s)

Online example: https://andreymal.org/files/netsurfjsbug/case2.html

This problem is affected only for separate .js files: something like <script>document.write('!!');</script> works good. Online example: https://andreymal.org/files/netsurfjsbug/case3.html
Steps To ReproduceYou also can see steps to reproduce on YouTube: https://www.youtube.com/watch?v=IMjZPFBOE64
Additional InformationTested on Ubuntu 16.04 (NetSurf 3.7 compiled from source) and latest Arch Linux (NetSurf 3.6 and 3.7 installed from official repository)
TagsNo tags attached.
Attached Filestxt netsurfjs37bug.txt (158,438) 2017-11-01 11:58
https://bugs.netsurf-browser.org/mantis/file_download.php?file_id=523&type=bug

Notes
(0001760)
Daniel Silverstone   
2018-04-21 10:04   
Thank you for such a comprehensive bug report. We have confirmed the behaviour here and will try to resolve the issue when we can.
(0001910)
Daniel Silverstone   
2019-05-06 16:17   
This was a very interesting bug to track down. In actuality the write of a single ! was also broken, just in a way which was hidden in a non-debug build of our HTML parser.

Thanks again.
(0002011)
Vincent Sanders   
2019-07-19 09:30   
we believe this issue has been resolved in NetSurf 3.9

Issue History
2017-11-01 11:58andreymalNew Issue
2017-11-01 11:58andreymalFile Added: netsurfjs37bug.txt
2018-04-21 10:04Daniel SilverstoneAssigned To => Daniel Silverstone
2018-04-21 10:04Daniel SilverstoneStatusnew => confirmed
2018-04-21 10:04Daniel SilverstoneNote Added: 0001760
2019-05-06 16:17Daniel SilverstoneStatusconfirmed => resolved
2019-05-06 16:17Daniel SilverstoneResolutionopen => fixed
2019-05-06 16:17Daniel SilverstoneFixed in Version => 3.9
2019-05-06 16:17Daniel SilverstoneTarget Version => 3.9
2019-05-06 16:17Daniel SilverstoneFixed in CI build # => 4622
2019-05-06 16:17Daniel SilverstoneNote Added: 0001910
2019-07-19 09:30Vincent SandersStatusresolved => closed
2019-07-19 09:30Vincent SandersNote Added: 0002011