Jump to content

Closing all bbCodes with the same tag


Guest Alfrеdo

Recommended Posts

Laziness would be a factor I guess, not having to type [/spoiler ], [/color ], ... makes it pretty easy ( [/] is shorter). When nesting tags, you don't need to see in which order they were opened to close them.

Once you've been using the above method, you don't want to go back. :) Though I can understand it may be a nightmare to implement, but it was just a suggestion of course.

Link to comment
Share on other sites

Come on, if you don't allow [b]over[u]lapp[/b]ing[/u] tags, it is no issue at all to support. Need I remind you that if you want to succeed in that valid html goal, you can not allow overlapping tags.



But if we want to succeed in that "pleasing customers" goal, we must allow overlapping tags. Most people who post on forums have little care for what the W3C says the formatting of their post should look like.
Link to comment
Share on other sites

What do you mean by, overlapping tags? Using a list tag inside a colour tag?



Not necessarily, it's when you start 2 tags, but close tag 1 before tag 2.

For example:

[b]Hello ev[i]ery[/b]one[/i]




XHTML doesn't allow this because it's an application of XML which is a strict language and only allows a sort of "tree" structure of elements. HTML is an application of SGML which is not always strict. Technically, if you want to XHTML valid you'd need to do this:

[b]Hello ev[/b][i][b]ery[/b]one[/i]


Which as you can see, is very confusing.

Link to comment
Share on other sites

I see what you mean. Trying to overlap tags at the other forum gives me this result:

[b]Hello every[/b]one

with eryone in italic. Looks like they don't support overlapping tags either then. I've never used them so I wouldn't miss it, but I understand why you can't have both.

[b]Hello ev[i]ery[/b]one[/i]

would become:

[b]Hello ev[i]ery[/]one[/]


Hello everyone
Hello everyone

Link to comment
Share on other sites

W3C Validator says 2 Errors:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<title>Test Document</title>

</head>

<body>

<b>1<u>2</b>3<i>4</u>5</i>

</body>

</html>



Output:
12345

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...