Adding the quote tests I found another edge case:
[quote author=]This is a quote[/quote]
that is parsed as:
<div class="quoteheader">Quote from: ]This is a quote[/quote</div><blockquote class="bbc_standard_quote"></blockquote>
For the way we do the parsing this is not entirely a bug, probably the intended behaviour, but since I'm not entirely sure, what do you think?
I mean, honestly, if you are going to try and fix all of these edge-cases crap, get ready to spend the rest of your life on it. Seriously, if you really want to break something, you will often find a way to do so, but in "real" applications, those edge cases are not just unlikely, but barely possible at all (who would ever use "]myusername" and similars?).
If you want to fix it, put the author between -->" "<-- these and tell the parser to ignore everything inside of those, just for this edge case.
If you want to be more realistic, say eff it and move on to more important things O:-)
Write test-cases is a way to define the behaviour. Define the behaviour knowing why you have defined it like that, is one of the differences between spaghetti code and a well organized code-base.
If at all possible I don't want to end up like our predecessor with code that is there and nobody knows why (not even the author). I would prefer to have a track of the reasons a developer picked a certain decision.
Tests cases are a way to have this tracked.
If the above mentioned is acceptable and can be considered intended, I can add a test reproducing the behaviour, that way we know that we have taken the responsibility to decide that such a case is irrelevant and the problem is acceptable and not just a random unverified behaviour. ;)
Sounds reasonable, I agree. :)
Just got a white page when I clicked post, with an unidentified site icon, too. Check server logs, please. If it has to be a new topic, I'll post it.