Showing code in code tags - bug!

iambackiamback Registered Users Posts: 288 Major grins
edited June 30, 2007 in Dgrin Forum Support
I just tried to embed some HTML code samples in a post in [code]...[/code] tags - only to find that the HTML inside them was interpreted - i.e., the code tags don't do what they should!

(I worked around it by "escaping" every opening "<" as &lt; but of course not every forum user could be expected to think of such a workaround.)

Time for vBulletin upgrade, maybe?
I also note that you support only code and php tags - adding html might be useful.
Marjolein Katsma
Look through my eyes on Cultural Surfaces! - customizing... currently in a state between limbo and chaos

Comments

  • David_S85David_S85 Administrators Posts: 13,250 moderator
    edited June 11, 2007
    iamback wrote:
    I just tried to embed some HTML code samples in a post in
    ...
    
    tags - only to find that the HTML inside them was interpreted - i.e., the code tags don't do what they should!
    (I worked around it by "escaping" every opening "<" as < but of course not every forum user could be expected to think of such a workaround.)
    Time for vBulletin upgrade, maybe?
    I also note that you support only code and php tags - adding html might be useful.

    An upgrade won't help. We have purposely turned HTML off in the forums. Too many possible errors to chase down if it was turned on. Sorry. As you noted, there are vBulletin code tags along with other options in the editor for you to get creative in your posts.
    My Smugmug
    "You miss 100% of the shots you don't take" - Wayne Gretzky
  • AndyAndy Registered Users Posts: 50,016 Major grins
    edited June 11, 2007
    iamback wrote:
    I just tried to embed some HTML code samples in a post in
    ...
    
    tags - only to find that the HTML inside them was interpreted - i.e., the code tags don't do what they should!

    (I worked around it by "escaping" every opening "<" as < but of course not every forum user could be expected to think of such a workaround.)

    Time for vBulletin upgrade, maybe?
    I also note that you support only code and php tags - adding html might be useful.
    Right, we don't allow most HTML stuff, I'm sorry about that.
  • iambackiamback Registered Users Posts: 288 Major grins
    edited June 12, 2007
    Andy wrote:
    Right, we don't allow most HTML stuff, I'm sorry about that.
    That's dumb, sorry. It's perfectly possible to allow HTML code blocks in vBulletin while not allowing HTML outside code blocks.

    What's more, I just reported that the HTML in a "code" code block is interpreted - so you are allowing it!! You'd better close that security hole speedily. And then allow HTML code blocks to show HTML code as code: that's what it's for.

    I know it can be done with vBulletin, I 'm on another vBulletin forum where we use it all the time to discuss code. You even get some syntax highlighting for free, making it easier to read the code as well!
    Marjolein Katsma
    Look through my eyes on Cultural Surfaces! - customizing... currently in a state between limbo and chaos
  • iambackiamback Registered Users Posts: 288 Major grins
    edited June 12, 2007
    David_S85 wrote:
    An upgrade won't help. We have purposely turned HTML off in the forums. Too many possible errors to chase down if it was turned on. Sorry. As you noted, there are vBulletin code tags along with other options in the editor for you to get creative in your posts.
    Read my post again: that's what's NOT working to filter HTML, it's doing the very opposite.
    Marjolein Katsma
    Look through my eyes on Cultural Surfaces! - customizing... currently in a state between limbo and chaos
  • iambackiamback Registered Users Posts: 288 Major grins
    edited June 12, 2007
    Looks like it's fixed now, thanks!

    (At least the [code] section, but having [HTML] enabled - instead of [PHP] - would be helpful!)
    Marjolein Katsma
    Look through my eyes on Cultural Surfaces! - customizing... currently in a state between limbo and chaos
  • AndyAndy Registered Users Posts: 50,016 Major grins
    edited June 12, 2007
    iamback wrote:
    Looks like it's fixed now, thanks!

    (At least the [code] section, but having [HTML] enabled - instead of [PHP] - would be helpful!)
    Hi, we're not enabling HTML, sorry. Thanks for asking though!
  • DavidTODavidTO Registered Users, Retired Mod Posts: 19,160 Major grins
    edited June 12, 2007
    iamback wrote:
    That's dumb, sorry.


    This just isn't going to get you very far around here, Lamback.
    Moderator Emeritus
    Dgrin FAQ | Me | Workshops
  • iambackiamback Registered Users Posts: 288 Major grins
    edited June 13, 2007
    DavidTO wrote:
    This just isn't going to get you very far around here, Lamback.
    The point is that I'm not asking to "enable HTML" - the very opposite! It seems that security hole I reported has at least been fixed now.

    I'm asking to enable vBulletin's "HTML code block" so HTML code can be shown as HTML code, with syntax highlighting and all.
    Not only would that be more useful than the generic "code code block", it would also prevent HTML from being interpreted.

    Is anyone round here ever showing PHP code? All I ever see is HTML/CSS which is what vBulletin's HTML code block is intended for.
    Marjolein Katsma
    Look through my eyes on Cultural Surfaces! - customizing... currently in a state between limbo and chaos
  • cabbeycabbey Registered Users Posts: 1,053 Major grins
    edited June 27, 2007
    iamback wrote:
    I'm asking to enable vBulletin's "HTML code block" so HTML code can be shown as HTML code, with syntax highlighting and all.

    <img src="https://us.v-cdn.net/6029383/emoji/headscratch.gif&quot; border="0" alt="" >

    You mean like this?

    [HTML]
    <h1>My Header</h1>
    <h2>My little header that could</h2>
    <img src="yada.png" width=100 height=250>
    [/HTML]

    Far as I know that's been enabled for quite a long time. <img src="https://us.v-cdn.net/6029383/emoji/ne_nau.gif&quot; border="0" alt="" >
    #!/bin/bash
    echo some random code
    

    [php]
    if ($bbuserinfo == 'Top')
    {
    $vboptions = 0;
    }
    [/php]
    SmugMug Sorcerer - Engineering Team Champion for Commerce, Finance, Security, and Data Support
    http://wall-art.smugmug.com/
  • iambackiamback Registered Users Posts: 288 Major grins
    edited June 28, 2007
    cabbey wrote:
    <img src="https://us.v-cdn.net/6029383/emoji/headscratch.gif&quot; border="0" alt="" >

    You mean like this?

    [HTML]
    <h1>My Header</h1>
    <h2>My little header that could</h2>
    <img src="yada.png" width=100 height=250>
    [/HTML]

    Far as I know that's been enabled for quite a long time. <img src="https://us.v-cdn.net/6029383/emoji/ne_nau.gif&quot; border="0" alt="" >
    As far as I know it took three attempts to even explain that "enabling HTML" was not the same thing as "enabling HTML code boxes". Which rather pissed off Andy. And then he had to think about it. <img src="https://us.v-cdn.net/6029383/emoji/mwink.gif&quot; border="0" alt="" >

    Yeah, a week is a long time... <img src="https://us.v-cdn.net/6029383/emoji/rolleyes1.gif&quot; border="0" alt="" >
    Marjolein Katsma
    Look through my eyes on Cultural Surfaces! - customizing... currently in a state between limbo and chaos
  • AllenAllen Registered Users Posts: 10,013 Major grins
    edited June 28, 2007
    iamback wrote:
    As far as I know it took three attempts to even explain that "enabling HTML" was not the same thing as "enabling HTML code boxes". Which rather pissed off Andy. And then he had to think about it. <img src="https://us.v-cdn.net/6029383/emoji/mwink.gif&quot; border="0" alt="" >

    Yeah, a week is a long time... <img src="https://us.v-cdn.net/6029383/emoji/rolleyes1.gif&quot; border="0" alt="" >
    The colors in there are nice but can't be seen in all styles. The dark blue
    and purple are barely visible in default style.
    Wish there was a way to use bold, might help.
    example
    [html]

    <h1>My Header</h1>
    <h2>My little header that could</h2>
    <img src="yada.png" width=100 height=250>

    [/html]
    Al - Just a volunteer here having fun
    My Website index | My Blog
  • AndyAndy Registered Users Posts: 50,016 Major grins
    edited June 28, 2007
    iamback wrote:
    As far as I know it took three attempts to even explain that "enabling HTML" was not the same thing as "enabling HTML code boxes". Which rather pissed off Andy. And then he had to think about it. mwink.gif

    Yeah, a week is a long time... rolleyes1.gif

    Nope, you never pissed me off. You didn't endear yourself to me, or any of the other folks here though, either. Actually, your entire way about it was just annoying and sad.

    Sorry, I call it like I see it.
  • RogersDARogersDA Registered Users Posts: 3,502 Major grins
    edited June 28, 2007
    Allen wrote:
    Wish there was a way to use bold, might help.
    Put the bold tags before and after the code box, not between the code tags.

    This is bold code
    
    [html]This is bold HTML Code[/html]
  • AllenAllen Registered Users Posts: 10,013 Major grins
    edited June 28, 2007
    RogersDA wrote:
    Put the bold tags before and after the code box, not between the code tags.

    This is bold code
    
    [html]This is bold HTML Code[/html]
    Thanks, that works, but the dark colors still can barely be seen using
    default style..

    This is bold
    [html]
    <h1>My Header</h1>
    <h2>My little header that could</h2>
    <img src="yada.png" width=100 height=250>
    [/html]

    This is not bold
    [html] <h1>My Header</h1>
    <h2>My little header that could</h2>
    <img src="yada.png" width=100 height=250>
    [/html]
    Al - Just a volunteer here having fun
    My Website index | My Blog
  • cabbeycabbey Registered Users Posts: 1,053 Major grins
    edited June 30, 2007
    iamback wrote:
    Yeah, a week is a long time... rolleyes1.gif

    Huh, I coulda sworn that feature was enabled a long time ago... but then I use about a dozen different vBulletin boards, so could be thinking of a different one. :)
    SmugMug Sorcerer - Engineering Team Champion for Commerce, Finance, Security, and Data Support
    http://wall-art.smugmug.com/
Sign In or Register to comment.