This is a migrated thread and some comments may be shown as answers.

<script> tag in the spell checked texts?

3 Answers 40 Views
Spell
This is a migrated thread and some comments may be shown as answers.
Ram
Top achievements
Rank 1
Ram asked on 06 Feb 2010, 01:22 AM
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

3 Answers, 1 is accepted

Sort by
0
Accepted
Rumen
Telerik team
answered on 09 Feb 2010, 01:21 PM
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.
0
Ram
Top achievements
Rank 1
answered on 09 Feb 2010, 07:42 PM
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
0
Lini
Telerik team
answered on 10 Feb 2010, 09:46 AM
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.
Tags
Spell
Asked by
Ram
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Ram
Top achievements
Rank 1
Lini
Telerik team
Share this question
or