e107inc / e107

e107 Bootstrap CMS (Content Management System) v2 with PHP, MySQL, HTML5, jQuery and Twitter Bootstrap. Issue Discussion Room: https://gitter.im/e107inc/e107
https://e107.org
GNU General Public License v3.0
318 stars 212 forks source link

[Feature request]: Table Captions with HTML please #5272

Open Vodhin opened 3 weeks ago

Vodhin commented 3 weeks ago

Motivation

I would like to use html tags in the Caption of table render so I can add icons or other interface elements to front end pages. It seems that tablerender strips them out via e107::getParser()->toText($caption) - and this is odd - for some themes and not others. When I change it to e107::getParser()->toHTML($caption) then all works ok.

Proposed Solution

In e_render_class.php: Change 401: $options['caption'] = e107::getParser()->toText($caption); to: 401: $options['caption'] = e107::getParser()->toHTML($caption);

Alternatives

No Alternative exists.

Additional Context

No response

Jimmi08 commented 2 weeks ago

I think you are doing something wrong. This was never an issue before. Weird.

Vodhin commented 2 weeks ago

I think you are doing something wrong. This was never an issue before. Weird.

I noticed it when testing different Themes. The current ->toText() works with Bootstrap 3 and Voux but does not work with Bootstrap 5 themes. Changing this to ->toHTML() makes it work with no issues.