- Test on Python 3.9 - 3.13
- Install a proper
bbcode
script in addition to being able to runpython -m bbcode
- Now using a
CaseInsensitiveDict
to 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_depth
argument to theParser
class, 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_literals
so things likeurl_template
can handle unicode replacements. - Test on Python 3.7.
- Added a
default_context
argument to theParser
class. - Added a
url_template
argument to theParser
class, allowing customization of the default linker (see #19 and #28).
- Set built-in
code
tag toreplace_cosmetic=False
.
- Allow overriding parser's
replace_html
,replace_links
, andreplace_cosmetic
onformat
calls.
- 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).