Tag closing

Sometimes some people forget to close their formating tags, and that looks wierd.
Isn't it possible to check for those things and fix them when posting.

Just becouse this is a programming board, here's some psuedo (I don't know asp):
[code]
push 0 on stack
while not end of document{
scan untill finding a tag.
if tag is a closing tag{
if tag is equall to the tag on top of stack then pop the stack
else{
for(i = 0; stack[top - i] == 0; ++i){
if tag is equall to stack[top - i]{
stack[top - i] = 1;
break;
}
}
}
} else {
push tag on stack
}
}
while stack isn't empty{
pop tag
if tag is not equall to 0 or 1 then add closing tag to document
}
[/code]

LOL!! :-)

Happy coding wishes
the one and only
[b]Niklas Ulvinge[/b] [white]aka [b]IDK[/b][/white]

Comments

  • Hi

    The next version of the forum that will be released later this year will have protection for that.


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

  • : Hi
    :
    : The next version of the forum that will be released later this year will have protection for that.
    :
    :
    : [blue][italic][b]/WEBMASTER[/b][/italic][/blue]
    :
    :

    Jippi :-)
Sign In or Register to comment.

Howdy, Stranger!

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

Categories