WebsiteBaker Support (2.13.x) > General Help & Support
Old problem back again: Can't delete pages 2.13.8
CodeALot:
Thank you VERY much for the quick solution! (Y) (Y)
sternchen8875:
--- Quote from: crnogorac081 on August 26, 2025, 08:08:11 AM ---Can we keep the ' and apply HTML to entities to langage variables when language file Are loaded ?
--- End quote ---
That's a very good question, and at first glance, the idea of manipulating the output seems like it should work.
However, here are the arguments against it:
After doing some research into older versions, I realized this wasn't a legacy issue, but actually my mistake. The Straight Apostrophe (\') is the wrong character in this context; the correct one is the Typographic (or Curly) Apostrophe (’). Maybe I just need a bigger font size in my editor... (sorry).
My first attempts were indeed to manipulate Translate.php, which handles language variables in WB. This would have been an easy fix, but it still would have required a patch in the end. So, why not get to the root of the problem?
The main issue is that a central change in Translate.php only ever provided a good solution for one side of the coin: either it fixed the JavaScript, or it fixed the PHP/HTML output, but never both at the same time. Ultimately, you can never know in advance in which context a language variable will be used. What is right in one place can be wrong somewhere else. For example, an escaped string like 'Pagina\'s' would break an SQL statement like this:
... 'AND field = \'' . $MENU['PAGES'] . '\'';
Most importantly, any changes we make can only affect things within our control—the core package and our addons. This solution would have no effect on older modules or third-party addons. What happens if one of those addons uses the broken variables, which our code can't fix for them?
Therefore, fixing the data in the language files was the only solution that solves the problem universally and for everyone.
Navigation
[0] Message Index
[*] Previous page
Go to full version