[Koha-bugs] [Bug 18665] Translatability: Add tt filter to allow html tags inside tt directives

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sun May 28 08:38:54 CEST 2017


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18665

Alex Buckley <alexbuckley at catalyst.net.nz> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #63697|0                           |1
        is obsolete|                            |

--- Comment #6 from Alex Buckley <alexbuckley at catalyst.net.nz> ---
Created attachment 63765
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63765&action=edit
Bug 18665 - Translatability: Add tt filter to allow html tags inside tt
directives

HTML tags inside template toolkit directives are not allowed because of
translation issues.
Add a filter that handles HTML tags.

Note you need to write quotes ' around the text you want displayed as a
heading

To test:
- Apply patch
- Add [% USE HtmlTags %] to the top of a tt file
- Add something like [% 'My nice title' | $HtmlTags tag="h1" %] to the tt file
- Verify that in output 'My nice title' has h1 tags
- Change template directive to something like
  [% 'My nice title' | $HtmlTags tag="h1" attributes='title="This is a nice
title attribute"' %]
- Verify that title attribute displays in output (source code or tooltip on 'My
nice title')

Notes: - Tests are planned for a second patch
       - Update for Wiki coding guidelines

Signed-off-by: Alex Buckley <alexbuckley at catalyst.net.nz>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list