Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

I would like to prevent users from using the h1 tag since the contents they provide will be used as the input for another webpage (and we would prefer not to have a large number of h1s floating around on this page).

In the documentation, I have found ALLOWED_HTML_TAGS but it's not clear to me if this is only internal or if I am able to override it. However, trying to override it inside my base.py file did not have an impact.

Any ideas? Thanks ✌️

You must be logged in to vote

Replies: 1 comment

Comment options

Hello @sarahzero we already have class inside of the ALLOWED_HTML_ATTRIBUTES.

So, you can modify the css that includes h1 in your end to handle this case.

# Hello there {: .my-class}

will show this:

<h1 class="my-class">Hello there</h1>
You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
🙏
Q&A
Labels
None yet
2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.