By: Vreixo Luis Gonzalez Caneda user 07 Jan 2022 at 9:39 a.m. CST

9 Responses
Vreixo Luis Gonzalez Caneda gravatar
Hi, Interception script messages added via bean with the following code should deal correctly with special characters like french accents. self.facesMessages = CdiUtil.bean(FacesMessages) error_message = String.format("#{msgs['%s']}", msg) self.facesMessages.add(severity, error_message) What we are seeing rendered is instead the scaped HTML for them. For example: "Non autorisé." transforms to "Non autorisé". This is also happening if we specify unicode symbol instead Non "\u00E9". We suppose that this is in relation of this escaping "StringEscapeUtils.escapeHtml4(evaluatedMessage);" in https://github.com/GluuFederation/oxCore/blob/master/oxJsfUtil/src/main/java/org/gluu/jsf2/message/FacesMessages.java. So we we're wondering which will be the solution. For us is quite important to be able to put accents as they're used a lot in french. Thank you very much for your help, Regards

By Vreixo Luis Gonzalez Caneda user 25 Jan 2022 at 10:42 a.m. CST

Vreixo Luis Gonzalez Caneda gravatar
Hi, Can you give us some ideas to continue debugging this issue? As our clients are French we need to show many special characters in our error messages so it's quite blocking to have a real implementation. Regards,

By Mobarak Hosen Shakil staff 25 Jan 2022 at 7:09 p.m. CST

Mobarak Hosen Shakil gravatar
Hi Luis, Can you please share a screenshot of what you are getting instead of expecting? I could not find the differences between "Non autorisé." and "Non autorisé"! Regards ~ Shakil

By Vreixo Luis Gonzalez Caneda user 27 Jan 2022 at 6:54 a.m. CST

Vreixo Luis Gonzalez Caneda gravatar
Hi Shakil, Sure, I think that editor is interpreting the unicode character. The problem is that we see the html replacement "&-e-acute" instead of é. Here is an screenshot: https://www.dropbox.com/s/mbr6nppo077v12n/Capture%20d%E2%80%99%C3%A9cran%20de%202022-01-27%2013-51-43.png?dl=0 Regards,

By Mobarak Hosen Shakil staff 06 Feb 2022 at 10:58 p.m. CST

Mobarak Hosen Shakil gravatar
Thanks Vreixo, I have replicated this issue. I will give an update soon. Regards ~ Shakil

By Mobarak Hosen Shakil staff 11 Mar 2022 at 11:29 p.m. CST

Mobarak Hosen Shakil gravatar
Just for the update An issue is opened: https://github.com/GluuFederation/oxTrust/issues/2134 Regards ~ Shakil

By Michael Schwartz Account Admin 26 Apr 2022 at 5:33 a.m. CDT

Michael Schwartz gravatar
Issued moved to here: https://github.com/GluuFederation/oxTrust/issues/2134

By Michael Schwartz Account Admin 26 Apr 2022 at 5:34 a.m. CDT

Michael Schwartz gravatar
Javier, as this is a bug effecting a supported customer, can you take a look?

By Michael Schwartz Account Admin 26 Apr 2022 at 5:57 a.m. CDT

Michael Schwartz gravatar
Here is a hack from another ticket... not sure if this makes sense for you... so don't take it as an exact recipe. And don't do this in production :-) __________ I. Turn off locale selection based on `ui_locales` parameter. 1. Copy `/opt/gluu/jetty/oxauth/webapps/oxauth.war!/authorize.xhtml` into `/opt/gluu/jetty/oxauth/custom/pages` 2. Remove 10th line `<f:viewAction action="#{authorizeAction.checkUiLocales}" />` in `authorize.xhtml` 3. Copy `/opt/gluu/jetty/oxauth/webapps/oxauth.war!/WEB-INF/incl/layout/login-template.xhtml` into `/opt/gluu/jetty/oxauth/custom/pages/WEB-INF/incl/layout` 4. Remove in 7th line `locale="#{language.localeCode}"` in `login-template.xhtml` 5. Restart oxAuth service II. Update custom script to handle cusom locale selection. 1. Add to `basic`script into method `prepareForStep` next start lines: ``` languageBean = CdiUtil.bean(LanguageBean) # Add logic to detect user language based on browser request languageBean.setLocaleCode("fr") ``` 2. Enable `basic` script and specify to use it as default ACR for oxAuth/oxTrust. 3. Try to log in 4. If everything work fine oxAuth should set cookie like this `org.gluu.i18n.Locale: "fr"`

By Michael Schwartz Account Admin 26 Apr 2022 at 6:01 a.m. CDT

Michael Schwartz gravatar
Here is another interesting issue that might have some useful info about localization https://support.gluu.org/customization/7990/localization-related-questions/