HTML Comment Element Bug

Post your questions and problem reports here

Moderator: kfury77

Forum rules
Please try to follow these guidelines. This will help to receive faster and more accurate response.
  • Check the Support section of the corresponding product first. Chances are you will find your answer there;
  • Do not create new topics for already reported problems. Add your comments to the existing topics instead;
  • Create separate topic for each problem request. Do NOT post a number of non-related problem reports in a single topic;
  • Give your topic a meaningful title. Titles such as "A question," "Bug report" and "Help!" provide others no clue what your message is about;
  • Include the version number of the software you are using;
  • This is not an official customer support helpdesk. If you need a prompt and official response, please contact our support team directly instead. It may take a while until you receive a reply in the forum;
Post Reply
CaliforniaJerry
Posts: 88
Joined: Sat Aug 01, 2009 4:48 am
Location: Mountain View, CA
Contact:

HTML Comment Element Bug

Post by CaliforniaJerry »

WeBuilder v9.5.2.106

I have the following code in my header.php file, and there is no visual indication of mismatched Comment Element Tags.

Notice the terminating tags are missing one hyphen, "->":

Code: Select all

    <!-- NAV BAR :: BEGIN ->
    <div id="navbar">
      <ul id="nav">
        <li><a href="<?php echo get_option('home'); ?>">Home</a></li>
        <?php // NAVIGATION HEADER :: LIST ?>
        <?php wp_list_pages('title_li=&depth=4&sort_column=menu_order'); ?>
    <!-- NAV BAR :: END ->
User avatar
Karlis
Site Admin
Posts: 3605
Joined: Mon Jul 15, 2002 5:24 pm
Location: Riga, Latvia, Europe
Contact:

Re: HTML Comment Element Bug

Post by Karlis »

Since this has not reported in the last 7 or so years, I believe nobody really cares, though the point is valid. I put it to lowest priority, what is more, with version 2010 you will get a documentation for editing the syntax highlighters, so you will be able to fix this yourself, if it is bothering you.
Karlis Blumentals
Blumentals Software
www.blumentals.net
CaliforniaJerry
Posts: 88
Joined: Sat Aug 01, 2009 4:48 am
Location: Mountain View, CA
Contact:

Post by CaliforniaJerry »

The syntax highlighter editing options will be helpful. Thanks the "heads up."
CaliforniaJerry
Posts: 88
Joined: Sat Aug 01, 2009 4:48 am
Location: Mountain View, CA
Contact:

Re: HTML Comment Element Bug

Post by CaliforniaJerry »

Thinking about this a little bit more...

You bring up the supposition that no one has noticed this before. And while that may be true, it is nonetheless a flagrant bug in your program. Broken code is not being highlighted, that's not a good thing.

If a terminating comment tag is missing, it will cause all the following code to be broken, until the next "-->" is found. (Am I mistaken about this?) And yet the editor shows no indication of this. The correct behavior is, the broken code "should be" gray'd out as if it's part of the, as yet, unterminated comment. But that's not happening. It would seem reasonable to expect it to be fixed in the next major release, or subsequent updates.

I don't think the user can correct this with Preferences syntax highlighting. (Can we?)

<div>Some Code</div>
<!-- Unterminated Comment ->
<div>Some Code Here</div>
<p>Some paragraph text here... blah blah blah</p>
<!-- Another Comment -->

<div>Some More Code</div>
<p>Another paragraph text here.</p>
User avatar
syrupcore
Top Contributor
Posts: 917
Joined: Thu Jul 21, 2005 12:58 am
Location: Portland, Oregon, usa
Contact:

Re: HTML Comment Element Bug

Post by syrupcore »

CaliforniaJerry wrote: I don't think the user can correct this with Preferences syntax highlighting. (Can we?)
not yet. well, you can dig in there and try to suss it out but there are no docs at this point. looking forward to seeing the docs in 2010 cause I couldn't figure it out. :)
User avatar
Karlis
Site Admin
Posts: 3605
Joined: Mon Jul 15, 2002 5:24 pm
Location: Riga, Latvia, Europe
Contact:

Re: HTML Comment Element Bug

Post by Karlis »

CaliforniaJerry wrote:I don't think the user can correct this with Preferences syntax highlighting. (Can we?)
Yes, you can.

To customize syntax highlighting script:
1) Learn the syntax of code highlighting scripts
2) In Preferences window, under Text Editor, select Colors.
3) Click Advanced Tools and select Custom Highlighting Scripts.
4) Select the language for which you want to customize the highlighting.
5) Click Save Original Script to save the current highlighting script.
6) Use the original script as the base for your new custom script.
7) When your customized script is ready, return to the Custom Highlighting Scripts window, pick the language and select your script.
8) Restart the application.

With version 2010 there will be help topic on this. For now I have uploaded the doc to:
http://www.blumentals.lv/parsers_doc.htm

While I agree, this is uncool, at this point, just before the release of 2010 we are too busy to take a look at this since nobody seems to care. I'll try to pay some attention to this after mor eimportent issues are settled, providing nobody will crack it :) I promise free upgrade to 2010 for the first person to crack it and post a solution :)
Karlis Blumentals
Blumentals Software
www.blumentals.net
davenz

Re: HTML Comment Element Bug

Post by davenz »

Well, that's me out for a free upgrade; I couldn't crack a mirror let alone anything like this. Perhaps I could do a little dance or something instead?

Dave.
CaliforniaJerry
Posts: 88
Joined: Sat Aug 01, 2009 4:48 am
Location: Mountain View, CA
Contact:

PHP Structure Pointer Breaks Comment Tags

Post by CaliforniaJerry »

Although this is not the correct way to comment out PHP code, it is problematic...
If you look at this code in WeBuilder, you will see the comment tag ( <!-- )being terminated by the class pointer operator ( -> ) in "$post->ID".

Code: Select all

<!--  BEGIN COMMENT
			<?php if (get_post_meta($post->ID, 'thumbnail', true) != '') { ?>
            <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/post-images/<?php $key="thumbnail"; echo get_post_meta($post->ID, $key, true); ?>" alt="" border="0" class="image" /></a>
            <?php } 
END COMMENT --> 
Post Reply