<script> tag in the spell checked texts?

4 posts, 1 answers
  1. Lion
    Lion avatar
    23 posts
    Member since:
    Aug 2012

    Posted 05 Feb 2010 Link to this post

    Hi,
    I noticed that if I type in <script> tag within the spell-checked texts, it doesn't show up in the SpellChecker Dialog. Is there any way to have it show up? I know it's bit of a silly question, but a bug has been filed about it and I have to investigate. :(

    FYI, I am using this technique for spellchecking.
    http://www.telerik.com/help/aspnet-ajax/spell_howtomutlipletextareas.html

    Thank you!!
    Kate
  2. Answer
    Rumen
    Admin
    Rumen avatar
    12851 posts

    Posted 09 Feb 2010 Link to this post

    Hi Kate,

    I was able to reproduce the problem and we will fix it by encoding the < and > symbols of the tag to &lt; and &gt; entities. I logged the issue in the PITS system so that you can check its status.

    I added 500 Telerik points to your account for your bug report.

    Kind regards,
    Rumen
    the Telerik team

    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
    Follow the status of features or bugs in PITS and vote for them to affect their priority.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Lion
    Lion avatar
    23 posts
    Member since:
    Aug 2012

    Posted 09 Feb 2010 Link to this post

    Wow.. telerik points. Cool, thanks!

    Would you mind sharing the fix when it is done? Once we purchased RadControl for ASP.net I think we are going to get a source code. I will fix it there as well.
    Thanks!
    K
  5. Lini
    Admin
    Lini avatar
    2144 posts

    Posted 10 Feb 2010 Link to this post

    Hi Kate,

    The changes are to the get_text() and set_text() methods in the Telerik.Web.UI.Spell.HtmlElementTextSource object in the RadSpell.js file. The change is to add one line to encode < to &lt; when getting the text and from &lt; back to < when setting the text in the textbox:

    get_text: function()
    {
        //...
        text = text.replace(/</g, "<rslt/>&lt;");
        return text;
    },
     
    set_text: function(text)
    {
        text = text.replace(/<rslt\/>&lt;/gi, "<");
        //... set text
    },

    The fix will be included in the next official release as well as the next RadControls for ASP.NET AJAX internal build (http://www.telerik.com/account/latest-internal-builds.aspx).

    Greetings,
    Lini
    the Telerik team

    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
    Follow the status of features or bugs in PITS and vote for them to affect their priority.
Back to Top