MantisBT - NetSurf
View Issue Details
0002416NetSurfJavascriptpublic2016-01-27 18:522017-10-16 23:39
ReporterMichael Drake 
Assigned ToMichael Drake 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusclosedResolutionfixed 
PlatformAnyOS-OS Version-
Product Version3.6 
Target Version3.7Fixed in Version3.7 
Fixed in CI build #4065
Reported in CI build #3315
URL of problem page
Summary0002416: HTML style comments in JavaScript not handled
DescriptionHTML style comments in JavaScript not handled.

See https://github.com/svaarala/duktape/pull/564
TagsNo tags attached.
Attached Fileshtm comment.htm (270) 2016-01-27 19:13
https://bugs.netsurf-browser.org/mantis/file_download.php?file_id=403&type=bug

Notes
(0001159)
David Pitt   
2016-01-27 19:18   
(Last edited: 2016-01-27 19:38)
Uploaded a test file, comment.htm. The javascript writes are rendered with Safari but not with NetSurf.

<!DOCTYPE HTML>
<html><head> <title>Comment failure</title></head><body>

Test - with single line html comment

<script>
document.write("hello world 1");
<!-- here is some javascript -->
document.write("hello world 2");
</script>

End of Test

</body> </html>

(0001176)
Dave Higton   
2016-02-01 14:43   
HTML-style comments used not to be legal in Javascript, but relatively recently they have been adopted into the language.

The version of the duktape library currently used by NS does not handle them, but a future version will.
(0001528)
Michael Drake   
2017-03-27 11:04   
Now implemented in upstream Duktape: https://github.com/svaarala/duktape/commit/b0b5cbdd103d82a5544025f767063865df8b91ee

We'll get this when Duktape 2.1 is released, and when we update from 2.0.2 to 2.1.
(0001539)
Michael Drake   
2017-04-21 12:09   
Fixed in #4065, which updates us to duktape 2.1
(0001666)
Vincent Sanders   
2017-10-16 23:39   
Thankyou for your report, this has been resolved in the 3.7 release

Issue History
2016-01-27 18:52Michael DrakeNew Issue
2016-01-27 19:13David PittFile Added: comment.htm
2016-01-27 19:18David PittNote Added: 0001159
2016-01-27 19:18David PittNote Edited: 0001159bug_revision_view_page.php?bugnote_id=1159#r1741
2016-01-27 19:38David PittNote Edited: 0001159bug_revision_view_page.php?bugnote_id=1159#r1742
2016-02-01 14:43Dave HigtonNote Added: 0001176
2016-02-01 14:43Dave HigtonStatusnew => acknowledged
2016-02-01 14:43Dave HigtonDescription Updatedbug_revision_view_page.php?rev_id=1755#r1755
2017-03-27 11:04Michael DrakeNote Added: 0001528
2017-04-06 14:12Michael DrakeAssigned To => Michael Drake
2017-04-06 14:12Michael DrakeStatusacknowledged => assigned
2017-04-06 14:13Michael DrakeStatusassigned => confirmed
2017-04-06 14:13Michael DrakeDescription Updatedbug_revision_view_page.php?rev_id=1944#r1944
2017-04-21 12:09Michael DrakeStatusconfirmed => resolved
2017-04-21 12:09Michael DrakeResolutionopen => fixed
2017-04-21 12:09Michael DrakeProduct Version4.0 => 3.6
2017-04-21 12:09Michael DrakeFixed in Version => 3.7
2017-04-21 12:09Michael DrakeTarget Version4.0 => 3.7
2017-04-21 12:09Michael DrakeFixed in CI build # => 4065
2017-04-21 12:09Michael DrakeNote Added: 0001539
2017-10-16 23:39Vincent SandersStatusresolved => closed
2017-10-16 23:39Vincent SandersNote Added: 0001666