mdjnelson / moodle-mod_customcert

Enables the creation of dynamically generated certificates with complete customisation via the web browser.
https://moodle.org/plugins/mod_customcert
GNU General Public License v3.0
90 stars 158 forks source link

Issue #629: strip HTML tags when getting string width #630

Closed rhell4 closed 1 month ago

rhell4 commented 1 month ago

As described in issue #629 the auto-linking filters can mess up text element positions. The actual width should only be calculated from the content without HTML tags. See the issue for testing instructions.

mdjnelson commented 1 month ago

Thanks - looks good to me. The only issue is if people have already adjust the position because of the HTML being taken into account we could ruin their certificates .. need to think how to approach this. Maybe just mention it on the forums, or we could add a hack and only do it for new certificates but that seems yuck. Any thoughts?

rhell4 commented 1 month ago

I do agree that a hack to only do this for new certificates seems yuck, also that glossary terms and new activities could be created in the future that then effect older certificates which would have this issue. I think mentioning this on the forums/relevant places is a good idea, potentially add it to the changelog too?

mdjnelson commented 1 month ago

Ok, cool. I agree. Ill just make a note in the changelog. Ill hopefully get some time tonight and backport this to 4.1.