NetSpell checker - how to ignore html tags

Last post 12-14-2006, 11:17 AM by Deminora. 1 replies.
Sort Posts: Previous Next
  •  02-09-2006, 11:05 AM 15772

    NetSpell checker - how to ignore html tags

     Hello,

    Can you please post information on how to disable html tags from the spell check process?

    You can paste the following html text into CuteEditor and spell check:

    <p>  </p>
    <p class="MsoNormal"><i style="mso-bidi-font-style: normal">WeFOL;</i><i style="mso-bidi-font-style: normal"><span style="font-family: 'franklin gothic demi'">IHSEG<o:p></o:p></span></i>
    </p>
    <p class="MsoNormal"><span style="font-family: algerian">PSJDG<o:p></o:p></span>
    </p>
    <p class="MsoNormal"><span style="font-family: 'franklin gothic demi'">‘IHSDG’OIHNSDG<o:p></o:p></span>
    </p>
    <p class="MsoNormal"><span style="font-family: 'franklin gothic demi'">HANDG’ADF’OI<b style="mso-bidi-font-weight: normal"><span style="color: fuchsia">HADG’FIHNA</span></b>’FGIOH</span>
    </p>
    <p class="MsoNormal">AC</p>
    <p class="MsoNormal"><i style="mso-bidi-font-style: normal"><span style="color: #ff6600; font-family: 'century gothic'">ZSDVC’LAEF]IQA<o:p></o:p></span></i>
    </p>
    <p class="MsoNormal"><i style="mso-bidi-font-style: normal"><span style="color: #ff6600; font-family: 'century gothic'">T<o:p></o:p></span></i>
    </p>
    <p class="MsoNormal"><span style="color: #ff6600; font-family: 'century gothic'">DASF<o:p></o:p></span>
    </p>
    <p class="MsoNormal">AHDF</p>
    <p class="MsoNormal"><o:p> </o:p>
    </p>

    You'll notice that it misses most of the misspelled words and asks for corrections on fonts specified within html tags.

    I have downloaded the project from SourceForge and believe I need to alter this line:

     

    private Regex _htmlRegex = new Regex(@"</[c-g\d]+>|</[i-o\d]+>|</[a\d]+>|</[q-z\d]+>|<[cg]+[^>]*>|<[i-o]+[^>]*>|<[q-z]+[^>]*>|<Angel [A]+[^>]*>|<(\[^\]*\|'[^']*'|[^'\>])*>", RegexOptions.IgnoreCase & RegexOptions.Compiled);


    to update the Regex.  Any other way to do this?

    Thanks!

    BTW, when I tried to post this same message using a FireFox browser, all but the first line was cut out.

    -- Liz
     
     
  •  12-14-2006, 11:17 AM 25123 in reply to 15772

    Re: NetSpell checker - how to ignore html tags

    I have the same problem. I need to ignore html tags during spell checking. Please advice.
View as RSS news feed in XML