puts http:// before a string even if i don't - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

puts http:// before a string even if i don't

I posted a message in linux board and it puts a http:// before httpd even if I don't. Thats not good IMO.

Lets see if it does here to..
httpd

Comments

  • Eric TetzEric Tetz Posts: 2,141Member
    : I posted a message in linux board and it puts a http:// before httpd even if I don't. Thats not good IMO.
    :
    : Lets see if it does here to..
    : httpd

    Yeah, this board has a few gotchas like that. An easy workaround for this problem is to use a style-code on one of the letters.

    [black]h[/black]ttpd

    See? Hit "Post a reply to this message" to see how I did it.

    WEBMASTER: if you are reading this, here's a interesting bug in the style-code system: if you put style-code around text containing the 'at' symbol (@), that board converts it into a 'mailto' link. Some examples

    [italic]@[/italic]
    [b]@[/b]
    [b]foo@[/b]
    [b]@bar[/b]
    [b] foo@bar[/b]
    [color=0000ff]@something[/color]

    It appears that any string in the form of text@text gets converted into a mailto:. Having a 'mailto' style-code would be useful. Having the board automatically convert anything with an @ in it into a 'mailto' is a Bad Thing, especially on a site that discusses source code.

    For instance, if I use style-codes in Java source which contains JavaDoc style comments, the JavaDoc directives all get screwed (because they start with an @). The board turns them all into 'mailto' links. Example:

    [code=ffffff]
    [color=000080][b]class[/b][/color] test {
    [color=80a0b0][italic]/**[/italic][/color][color=907050] The entry point function.[/color]
    [color=80a0b0][italic] * [/italic][/color][color=907050]@param[/color][color=804040][b] args[/b][/color][color=80a0b0][italic] The command line arguments[/italic][/color]
    [color=80a0b0][italic] * [/italic][/color][color=907050]@return[/color][color=80a0b0][italic] nothing[/italic][/color]
    [color=80a0b0][italic] */[/italic][/color]
    [color=000080][b]static[/b][/color] [color=000080][b]public[/b][/color] [color=000080]void[/color] main( String[] args ) {
    System.out.println([color=bb0000]"Hello, World!"[/color]);
    }
    }
    [/code]

    Cheers,
    Eric



  • gautamgautam Posts: 642Member
    Hey,
    Yep, got it, thanks.

    I thought it best to bring it to light cos these trivial things can make a lot of differences in certain places, while in most it doesn't matter.

    Just trying to help by making this board a better place. :-)



  • WEBMASTERWEBMASTER Posts: 549Member
    I made some tweaking of the rendering code and now these problems should be fixed.

    I now check if there's a "." in the URL/Mail before I render it, otherwise I don't.

    So


    http://
    httpd

    @
    @
    foo@
    @bar
    foo@bar
    @something

    No don't render at all.

    Let me know if if dones't wo the work.



    [blue][italic][b]/WEBMASTER[/b][/italic][/blue]


  • gautamgautam Posts: 642Member
    http://
    httpd

    @
    foobar@

    hmm Thanks....


    : I made some tweaking of the rendering code and now these problems should be fixed.
    :
    : I now check if there's a "." in the URL/Mail before I render it, otherwise I don't.
    :
    : So
    :
    :
    : http://
    : httpd
    :
    : @
    : @
    : foo@
    : @bar
    : foo@bar
    : @something
    :
    : No don't render at all.
    :
    : Let me know if if dones't wo the work.
    :
    :
    :
    : [blue][italic][b]/WEBMASTER[/b][/italic][/blue]
    :
    :


Sign In or Register to comment.