The issue of ignoring markup tags such as [code] which do not have closing tags ([/code]) has been brought up in a couple of threads now, and I'd like to tackle this issue.
As I have mentioned before, it is not possible to look for unclosed tags due to the structure and admin customizability present.
However, I think I may have a partial solution, however it does have a drawback. I'm interested in feedback on this idea as I have not decided whether or not it is a worthwhile addition.
Basically, when you post a message, your post will be checked for closing tags for things like [code], [red], [#FF0000], [reply], etc. If you don't have a closing tag, the tag itself will be escaped (and therefore the markup will be ignored).
This also means there needs to be a way to escape tags - my thinking so far is that tags starting with a "." will have the dot chopped off when displayed. So, [.code] will show up in posts as [code], but will not be treated like a [code] tag.
So, let's say my post looks like the following line:
[code]abc def ghi[code]
What would happen is that since the code tags are unterminated, the line would be converted to this:
[.code]abc def ghi[.code]
and so it would show up as:
[code]abc def ghi[code]
instead of the mess that might otherwise show up.
I'd like to hear any feedback or suggestions any of you may have regarding this issue.
Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
As I have mentioned before, it is not possible to look for unclosed tags due to the structure and admin customizability present.
However, I think I may have a partial solution, however it does have a drawback. I'm interested in feedback on this idea as I have not decided whether or not it is a worthwhile addition.
Basically, when you post a message, your post will be checked for closing tags for things like [code], [red], [#FF0000], [reply], etc. If you don't have a closing tag, the tag itself will be escaped (and therefore the markup will be ignored).
This also means there needs to be a way to escape tags - my thinking so far is that tags starting with a "." will have the dot chopped off when displayed. So, [.code] will show up in posts as [code], but will not be treated like a [code] tag.
So, let's say my post looks like the following line:
[code]abc def ghi[code]
What would happen is that since the code tags are unterminated, the line would be converted to this:
[.code]abc def ghi[.code]
and so it would show up as:
[code]abc def ghi[code]
instead of the mess that might otherwise show up.
I'd like to hear any feedback or suggestions any of you may have regarding this issue.
Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com