Bug 19852 - Add message text box in circulation for patrons does not accept HTML tags
Summary: Add message text box in circulation for patrons does not accept HTML tags
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-20 17:04 UTC by Michael Cabus
Modified: 2023-10-04 00:20 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
result after adding HTML tags for a patron message (275.96 KB, image/png)
2017-12-20 17:04 UTC, Michael Cabus
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Cabus 2017-12-20 17:04:57 UTC
Created attachment 69958 [details]
result after adding HTML tags for a patron message

Hi
  When you add a patron message in circulation.pl, the modal that appears has a text box that does not accept HTML tags.  Some libraries use HTML tags in these messages to link to information in Koha and to format the display of the message (see attached).  Having this modal accept HTML would allow formatting and linking in messages.
Comment 1 Katrin Fischer 2021-06-03 22:57:25 UTC
Verified in master, that HTML is still escaped in messages.
Comment 2 Sarah Cornell 2022-09-21 20:30:47 UTC
I'd like to be able to format report notes so they are more useful for users.  I can use the jQuery workaround from the wiki, but it would be great if it was available without local jQuery.
Comment 3 David Cook 2022-09-23 00:09:43 UTC
What sort of HTML tags to people typically use for these messages?
Comment 4 Lisette Scheer 2022-09-23 00:31:38 UTC
Formatting options, like maybe bold or italics, even links would be nice. 

Also if you could say, add a class as a prepopulated message and use css to displace specific messages differently.
Comment 5 Katrin Fischer 2023-10-01 15:24:34 UTC
Still valid.
Comment 6 David Cook 2023-10-04 00:20:59 UTC
I've been thinking about this topic for some time... and maybe a solution is to create a new Template::Toolkit filter that uses C4::Scrubber/HTML::Scrubber. 

An old version already exists on CPAN: https://metacpan.org/pod/Template::Plugin::Filter::HTMLScrubber

We could either use that one or come up with our own.

The tough part here is the configuration. Deciding how rigid/flexible to make it for long-term maintainability but also end-user usability.