html help please

Discussion in 'Web Design & Coding' started by Perris Calderon, May 1, 2006.

  1. Perris Calderon

    Perris Calderon Moderator Staff Member Political User

    Messages:
    12,332
    Location:
    new york
    my friends site, firedoglake as an interesting problem

    if you click the comments link and post a comment, html tags are allowed, BUT if you leave a tag unclosed every subsequent post has that tag untill the original poster closes the tag

    for instance if I forgot to close bold tags, everone's post that followed mine would be in bold

    any solutions?
     
    Last edited: May 1, 2006
  2. SPeedY_B

    SPeedY_B I may actually be insane.

    Messages:
    15,800
    Location:
    Midlands, England
    How about filing a bug with wordpress?
     
  3. Perris Calderon

    Perris Calderon Moderator Staff Member Political User

    Messages:
    12,332
    Location:
    new york
    will suggest, thanx
     
  4. dubstar

    dubstar format c:

    Messages:
    1,357
    Location:
    Southern California
    disable HTML?
     
  5. Perris Calderon

    Perris Calderon Moderator Staff Member Political User

    Messages:
    12,332
    Location:
    new york
    they don't want to do that

    is there a "close all tags" tag that would be automatically posted when a person hits the submit button?
     
  6. Grandmaster

    Grandmaster Electronica Addict Political User Folding Team

    Messages:
    10,574
    Location:
    Santa Clara, CA
    Damn, that's a bad bug. To fix it would require tinkering with Wordpress which is probably more trouble than it is worth.

    I know your friends don't want to do this, but if they disable html they can use a BBCode plugin that can help with formatting comments...as a temp solution until the bug is fixed.
     
  7. Perris Calderon

    Perris Calderon Moderator Staff Member Political User

    Messages:
    12,332
    Location:
    new york
    good option, I'll suggest it

    there are no "close all tags" commands in html?
     
  8. Grandmaster

    Grandmaster Electronica Addict Political User Folding Team

    Messages:
    10,574
    Location:
    Santa Clara, CA
    Nope. You have to individually close each tag.
     
  9. Perris Calderon

    Perris Calderon Moderator Staff Member Political User

    Messages:
    12,332
    Location:
    new york
    *goes to pattent new command*
     
  10. X-Istence

    X-Istence * Political User

    Messages:
    6,498
    Location:
    USA

    That would destroy the concept of HTML, and XML in general. As with one closing tag, suddenly multiple levels could be closed, which would become the biggest pain to parse for the browser on any level. Forget nesting then.
     
  11. Perris Calderon

    Perris Calderon Moderator Staff Member Political User

    Messages:
    12,332
    Location:
    new york
    shucks

    shows how much I know about HTML

    *goes to cancel check to patent attorney*
     
  12. Techno Child

    Techno Child web{designer} Folding Team

    Messages:
    871
    Location:
    Myrtle Beach
    no u guys.... there is a way, however you would have to edit every submit button to get it to work.... wordpress is written in php right? why don't you just put a hidden input above the submit with a value of whatever tag you want to close automatically, then include an onsubmit attached to the submit button?
     
  13. Perris Calderon

    Perris Calderon Moderator Staff Member Political User

    Messages:
    12,332
    Location:
    new york
    when you say every submit button, couldn't it just be in the master template of the submit button?
     
  14. Techno Child

    Techno Child web{designer} Folding Team

    Messages:
    871
    Location:
    Myrtle Beach
    i really don't know... haven't messed around with wordpress much... i have one registered however now that i have my own server i'm working on building /modding a different program
     
    Perris Calderon likes this.
  15. Perris Calderon

    Perris Calderon Moderator Staff Member Political User

    Messages:
    12,332
    Location:
    new york
    thanx techno, does anyone think they can make this work?

    if so, could you post it in here with the code tags, I will suggest it to them
     
  16. X-Istence

    X-Istence * Political User

    Messages:
    6,498
    Location:
    USA
    You could parse the form with JavaScript looking for open tags and then closing them, but it would be computationally heavy on the users machine, and in general is something to avoid.

    The best bet would be BBcode which can be validated with a parser to check if all tags are closed and if not it would return an error to the user.