After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 614072 - Finding javascript in HTML with "</script>"
Finding javascript in HTML with "</script>"
Status: RESOLVED FIXED
Product: gtksourceview
Classification: Platform
Component: Syntax files
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GTK Sourceview maintainers
GTK Sourceview maintainers
: 670803 733744 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2010-03-27 03:26 UTC by Garrett Regier
Modified: 2014-08-08 21:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
html: fix handling of the end of <style> and <script> (2.52 KB, patch)
2014-02-05 18:05 UTC, Sébastien Wilmet
committed Details | Review

Description Garrett Regier 2010-03-27 03:26:26 UTC
Javascript stops highlighting in HTML at any </script> even if its in as string.
Comment 1 Carnë Draug 2011-05-13 16:07:03 UTC
Although the description of this bug here is only about the tag </script> when used inside a string

<script src="www.google.com.br/foobar.js">
  var string = "</script>";
  //this is highlighted incorrectly (and so is the closing double quotes)
</script>

, this seems to be specific case of a larger bug where /> is used inside strings. Should this be marked as duplicate of the bug #565524 (which itself has 2 other duplicates).

Could someone maybe mark it as such?
Comment 2 Sébastien Wilmet 2013-11-15 17:35:23 UTC
*** Bug 670803 has been marked as a duplicate of this bug. ***
Comment 3 Sébastien Wilmet 2014-02-05 18:05:57 UTC
Created attachment 268195 [details] [review]
html: fix handling of the end of <style> and <script>

Example:

<style>
p {
    border: "</style>";
    padding: "/>";
    margin: 5;
}
</style>

<script language="/>" />

<script language="javascript">
var a = "/>";
var b = "</script>";
var c = 5;
</script>
<p>
var d = 6
</p>
Comment 4 Sébastien Wilmet 2014-02-05 20:13:44 UTC
swilmet> it relies on the default value of extend-parent (true), so the css or javascript has a higher priority than the <end>
<swilmet> if the js or css context can not highlight the text, the <end> is tried
<swilmet> that's how I understand the thing
Comment 5 Sébastien Wilmet 2014-02-06 13:42:02 UTC
The commit is pushed:
https://git.gnome.org/browse/gtksourceview/commit/?id=e35de2d4e808c3b9ddc71f95b824ac24e4d79c45

I hope there is no regressions.
Comment 6 Sébastien Wilmet 2014-08-08 21:54:58 UTC
*** Bug 733744 has been marked as a duplicate of this bug. ***