web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Portal comment error when using the < and the > symbols

(0) ShareShare
ReportReport
Posted on by 1,841 Most Valuable Professional

When adding a portal comment via a Microsoft Portal, users are getting an error when adding text that is precedded with a < and ends with an >. So for example, you might paste in information with someone's email address like this:

Megan Walker <hello@meganvwalker.com> 

When saving, the following error occurs:

1563.portal-comment-error.PNG

Any ideas how to allow this kind of comment to go through with the characters? 

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Arpit Shrivastava Profile Picture
    7,518 User Group Leader on at

    Hi Megan,

    I had also observed this in multiline text fields on Entity Form. Seems a bug in Dynamics 365 Portal. It does not allow angular brackets. We are managing it by removing the angle brackets '< >' on onpaste and onkeypress events

    Here is the code you can take help to get rid of this 

    $(window).load(function(){

    // Remove default onpaste event of textarea
    $("#id").removeAttr("onpaste");

    // OnKeypress Event
    $('#id').keypress(function(event) {
    if (event.keyCode == 60 || event.keyCode == 62) {
    alert("You are not allowed to enter Angle brackets");
    return false;
    }
    });

    // Onpaste Event

    $("#id").bind('paste',function()
    {
    setTimeout(function()
    {
    //get the value of the input text
    var data= $('#id').val() ;
    //replace the <> to ''
    var dataFull = data.replace(/[<>]/g, '');
    //set the new value of the input text without special characters
    $('#id').val(dataFull);
    });

    });
    });

    Hope it helps.


    If found useful, please mark the answer as verified.


    Cheers
    Arpit
    https://arpitmscrmhunt.blogspot.com

     

  • Suggested answer
    Adam Pfau Profile Picture
    265 on at

    I know this is older but wanted to add the setting that allows this.  Keep in mind that you are disabling some security by allowing these symbols in the comments.

    Create a site setting call DisableValidationWebTemplate and set this to True.  But default this setting is False but you wont see it unless you add it.  

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans
Liquid error: parsing "/globalsearch/?q=data+analyst++app+store" - Nested quantifier +.