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

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:

This works.


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:

This problem is affected only for separate .js files: something like <script>document.write('!!');</script> works good. Online example:
Steps To ReproduceYou also can see steps to reproduce on YouTube:
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

Daniel Silverstone   
2018-04-21 09: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.
Daniel Silverstone   
2019-05-06 15: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.
Vincent Sanders   
2019-07-19 08: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 09:04Daniel SilverstoneAssigned To => Daniel Silverstone
2018-04-21 09:04Daniel SilverstoneStatusnew => confirmed
2018-04-21 09:04Daniel SilverstoneNote Added: 0001760
2019-05-06 15:17Daniel SilverstoneStatusconfirmed => resolved
2019-05-06 15:17Daniel SilverstoneResolutionopen => fixed
2019-05-06 15:17Daniel SilverstoneFixed in Version => 3.9
2019-05-06 15:17Daniel SilverstoneTarget Version => 3.9
2019-05-06 15:17Daniel SilverstoneFixed in CI build # => 4622
2019-05-06 15:17Daniel SilverstoneNote Added: 0001910
2019-07-19 08:30Vincent SandersStatusresolved => closed
2019-07-19 08:30Vincent SandersNote Added: 0002011