Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Format content using JS after the page loaded #62

Closed
wants to merge 5 commits into from

Conversation

fmido88
Copy link

@fmido88 fmido88 commented Feb 3, 2025

The problem:
Some content which displayed in the page not passed through format_text() or format_string() so it will remains in the raw form with the tags {mlang xx} something {mlang}
(eg. breadcrumb, report tables, headers, ...)

Solution:
Using js module to alter the data and filter all using ajax request

New problem:
The filtration take a bit after the page loading but it works

Better solution:
Do the whole filtration process with js without rely on Ajax request

@iarenaza
Copy link
Owner

iarenaza commented Feb 3, 2025

I'm sorry, but I'm not merging this pull requests. Anything coming from from Moodle to the browser (both as HTML, and as AJAX values) should apply the filters correctly. This is just a band-aid to work around badly coded themes, plugins, etc. So we would be masking the bugs, instead of pressing the developers to fix them.

As I said, this doesn't belong in the standard filter_multilang2 plugin. You are of course free to apply the changes in your local copies 😄

@iarenaza iarenaza closed this Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants