Azure AD B2C Custom policy - translations encoding issue

Mikhail Smal 26 Reputation points
2020-11-16T10:02:38.46+00:00

Hi. We have Azure AD B2C configured with custom policies including custom email verification. In our policy we have provided translations for a number of strings. E.g. "success_send_code_msg". Such message is injected into the sign up page via window.CONTENT variable. It seems the encoding is incorrect. This is how the message looks like:
"success_send_code_msg":"En verifikationskod har skickats till din mailadress. Kopiera koden till fältet nedan."
As you can see the letter ä is UTF encoded and appears exactly as ä in the UI.

Am I doing something wrong or is it a bug? Is there a workaround for that?
Thanks.

Microsoft Entra External ID
Microsoft Entra External ID
A modern identity solution for securing access to customer, citizen and partner-facing apps and services. It is the converged platform of Azure AD External Identities B2B and B2C. Replaces Azure Active Directory External Identities.
2,651 questions
0 comments No comments
{count} votes

8 answers

Sort by: Most helpful
  1. Jules PERRODON 6 Reputation points
    2020-12-08T16:36:58.37+00:00

    Same problem here...
    While waiting for a fix, I wrote the following javascript to hide the issue. This might help some fellow Frenchmen.

     $(document).ready(function() {
                        const targetNode = $("#emailVerificationControl");
                        const config = { attributes: true, childList: true, subtree: true };
    
                        const callback = function(mutationsList, observer) {
                            if(targetNode.html().includes("é")) {
                                var replaced = targetNode.html().replace(/é/g, 'é');
                                targetNode.html(replaced);
                            }
                        }
    
                        const observer = new MutationObserver(callback);
                        observer.observe(document.getElementById("emailVerificationControl"), config);
                    });
    
    1 person found this answer helpful.

  2. 2020-12-10T18:48:03+00:00

    Hi guys, I'm back. Apologies for the issues. This is a bug which is being resolved. We estimate 2 weeks before being released. Let me know if I can help with anything else.

    1 person found this answer helpful.

  3. 2020-11-16T17:19:17.13+00:00

    Hello @Mikhail Smal . This could be related to the page layout version you're using. Try using the latest (2.1.0). You can find them appended in the ContentDefinition DataUri value. EG:

       <DataUri>urn:com:microsoft:aad:b2c:elements:globalexception:2.1.0</DataUri>  
    

    Let us know if this answer was helpful to you. If so, please remember to mark it as the answer so that others in the community with similar questions can more easily find a solution.


  4. Jules PERRODON 6 Reputation points
    2021-01-14T15:27:23.173+00:00
    0 comments No comments

  5. Octopus 121 Reputation points
    2021-01-26T12:19:08.3+00:00

    Same problem here with French and German, using user flows only.

    0 comments No comments