Allow html in pagination labels #60878
Labels
[Block] Query Pagination
Affects the Query Pagination Block - used for pagination within the Query Loop Block
[Type] Enhancement
A suggestion for improvement.
What problem does this address?
The current implementation of the
core/query-pagination-previous
andcore/query-pagination-next
blocks in Gutenberg useesc_html
to escape the label text, which doesn't allow any HTML tags. This limits the freedom to set a label asPrevious <span class="hide-on-mobile">Page</span>
:Right now this doesn't work:
What is your proposed solution?
Switch from
esc_html
towp_kses
for escaping the label text, allowing the<span>
tag, and maybe some other tags. This would give developers more freedom. Here's an example of how the code might look:The text was updated successfully, but these errors were encountered: