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 617950 - Syntax highlighting with PHP in HTML inputs buggy
Syntax highlighting with PHP in HTML inputs buggy
Status: RESOLVED DUPLICATE of bug 565524
Product: gedit
Classification: Applications
Component: general
2.30.x
Other Windows
: Normal normal
: ---
Assigned To: Gedit maintainers
Gedit maintainers
Depends on:
Blocks:
 
 
Reported: 2010-05-06 19:01 UTC by Jason Watkins
Modified: 2013-01-20 13:19 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jason Watkins 2010-05-06 19:01:24 UTC
I am having a small little issue where gEdit's syntax highlighting acts buggy.  For example, let's say I am creating a PHP file and write something like this:

<input type="text" value="<?php echo("$value");>" />

All is well until I get to the first quote inside the echo statement.  From there on, the color coding is incorrect for the rest of the line.  Even though the multiple quotes are correctly used, I think gEdit is having problems distinguishing the ones inside of the PHP statement from the ones on the outside. This is a very minor bug, which at worst is only an annoyance.

Keep up the good work!  gEdit is amazing!
Comment 1 teo (Account deactivated) 2011-02-15 19:10:29 UTC
I can confirm this issue.

This is not only with the <input> tag. This happens whenever you put php inside ANY html attribute. Other examples:

<a href="<?php echo "http://$myurl"; ?>">...</a>
<p style="color: <?php echo "rgb($r,$g,$b)"; ?>">...</p>

etc

This is NOT a minor issue at all. Syntax highlighting for a given language is useless unless it correctly highlights all code that is valid for that language. If syntax highlighting ever gets broken, you are forced to turn it off because it will make all your code unreadable. 

And the particular case that triggers this issue is not some rare or arcane code, it is something very common that is seen in most html/php pages.

This is a minor issue only for those who are not using gedit to write php code (or those who don't mind coding without any syntax highlight).
Comment 2 Giulio Malventi 2011-04-12 05:24:27 UTC
There is a similar issue also when using self-closing tags within JavaScript code. For example in:

<script>
  document.write('<input type="text" />');
</script>

highlight works until the / character and then breaks up.
Comment 3 h7e 2012-04-16 19:36:05 UTC
*** Bug 674212 has been marked as a duplicate of this bug. ***
Comment 4 h7e 2013-01-20 03:24:04 UTC
This bug is related to gtksourceview and already reported there. Someone with the proper rights should move it and mark it as a duplicate of https://bugzilla.gnome.org/show_bug.cgi?id=565524
Comment 5 Sébastien Wilmet 2013-01-20 13:19:13 UTC

*** This bug has been marked as a duplicate of bug 565524 ***