Skip to content

Commit

Permalink
format_html, mark_safe, translations
Browse files Browse the repository at this point in the history
  • Loading branch information
erikvw committed Jan 22, 2025
1 parent 20cb477 commit 57f6c09
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def create_box_item(self):
try:
position = self.box.next_position
except BoxIsFullError as e:
message = format_html("{}", str(e))
message = str(e)
messages.error(self.request, message)
else:
box_item = BoxItem(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from django.apps import apps as django_apps
from django.urls import reverse
from django.utils.html import format_html
from django.utils.safestring import mark_safe
from edc_constants.constants import YES
from edc_dashboard.url_names import url_names

Expand Down Expand Up @@ -36,5 +37,5 @@ def get_empty_queryset_message(self):
return format_html(
"All specimens have been processed. Continue to "
'<a href="{}" class="alert-link">packing</a>',
href,
mark_safe(href), # nosec B703, B308
)
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from django.apps import apps as django_apps
from django.urls import reverse
from django.utils.html import format_html
from django.utils.safestring import mark_safe
from edc_constants.constants import YES
from edc_dashboard.url_names import url_names

Expand Down Expand Up @@ -38,5 +39,5 @@ def get_empty_queryset_message(self) -> str:
return format_html(
"All specimens have been received. Continue to "
'<a href="{}" class="alert-link">processing</a>',
href,
mark_safe(href), # nosec B703, B308
)

0 comments on commit 57f6c09

Please sign in to comment.