- Test on Python 3.9 - 3.13
- Install a proper
bbcodescript in addition to being able to runpython -m bbcode
- Now using a
CaseInsensitiveDictto store tag options, so they retain the source case, but can be accessed case-insensitively. - Dropped support for Python 2.6, tested against Python 3.8.
- Improved code coverage, formatted with black, and cleaned up Flake8 warnings.
- Added a
max_tag_depthargument to theParserclass, defaulting to Python's recursion limit (Thanks, Lanny).
- List items
[*]only render inside of[list]tags, to avoid producing invalid HTML. - Switched to use
from __future__ import unicode_literalsso things likeurl_templatecan handle unicode replacements. - Test on Python 3.7.
- Added a
default_contextargument to theParserclass. - Added a
url_templateargument to theParserclass, allowing customization of the default linker (see #19 and #28).
- Set built-in
codetag toreplace_cosmetic=False.
- Allow overriding parser's
replace_html,replace_links, andreplace_cosmeticonformatcalls.
- Allow escaping quotes in tag options using backslash, i.e.
[quote='Sinéad O\'Connor'].
- TagOptions now defaults to strip=False (see #7). list and quote tags have been set to strip=True, as they are typically block-level elements anyway.
- A new "drop_unrecognized" option was added to the Parser. If set to True, unrecognized tags will be dropped (the default is to render them as regular text).
- Small bugfix concerning render_embedded (see #6).
- Escape quotes correctly to prevent XSS (see #4).
- Fixed a bug where escaping and cosmetic replacements were incorrectly performed on URLs (f6e0c11).