To be slightly pedantic, this is really a filter on the text. I'd be inclined to do this, instead:

```python
@register.filter
def bugize(content):
   """Escape content and link to bugs."""
```

Then in templates:

```jinja
{{ some_text|bugize }}
```