diff --git a/netbox/extras/models/customfields.py b/netbox/extras/models/customfields.py index 2f5f2fc6b..c74bb0cde 100644 --- a/netbox/extras/models/customfields.py +++ b/netbox/extras/models/customfields.py @@ -7,7 +7,7 @@ from django.contrib.postgres.fields import ArrayField from django.core.validators import RegexValidator, ValidationError from django.db import models from django.urls import reverse -from django.utils.html import strip_tags +from django.utils.html import escape from django.utils.safestring import mark_safe from extras.choices import * @@ -288,7 +288,7 @@ class CustomField(ChangeLoggedModel): field.model = self field.label = str(self) if self.description: - field.help_text = strip_tags(self.description) + field.help_text = escape(self.description) return field diff --git a/netbox/templates/inc/custom_fields_panel.html b/netbox/templates/inc/custom_fields_panel.html index ed673db08..91fca103e 100644 --- a/netbox/templates/inc/custom_fields_panel.html +++ b/netbox/templates/inc/custom_fields_panel.html @@ -8,7 +8,7 @@ {% for field, value in custom_fields.items %} - +
{{ field }}{{ field }} {% if field.type == 'boolean' and value == True %}