public void FindWithQuotesNewLinesAndExtraSpaces()
        {
            string fullHTML = @"<h4 class=""blogpostheader""><a id=""_ctl0__ctl1_bcr_aggposts___posts___posts__ctl1_titlelink"" href=""/erobillard/archive/2006/09/21/_2200_develop-without-borders_2c002200_-and-parkdale-legal-clinic.aspx"">&quot;develop without borders,&quot; and parkdale legal clinic</a></h4>
			<div class=""blogpostcontent"">
				at last night&#39;s tspug meeting,one of our new members was kevin smith of the parkdale legal clinic here in toronto. kevin told us apretty cool contest going on, i&#39;d love to see someone take him up on it.i&#39;ll let kevin describe what it&#39;s...
			</div>"            ;


            string partialSearchHTML = @"<h4 class=blogpostheader><a id=_ctl0__ctl1_bcr_aggposts___posts___posts__ctl1_titlelink 
href=""/erobillard/archive/2006/09/21/_2200_develop-without-borders_2c002200_-and-parkdale-legal-clinic.aspx"">""develop 
without borders,"" and parkdale legal clinic</a></h4>
<div class=blogpostcontent>at last night's tspug meeting,one of our new members 
was kevin smith of the parkdale legal clinic here in toronto. kevin told us 
apretty cool contest going on, i'd love to see someone take him up on it.i'll 
let kevin describe what it's... </div>";

            finder.SearchTargetHTML = fullHTML;
            finder.SearchFor        = partialSearchHTML;
            Assert.IsTrue(finder.Find());
            Assert.AreEqual(0, finder.StartIndex);
            Assert.AreEqual(fullHTML.Length, finder.Length);
        }
        private void cmdOK_Click(object sender, System.EventArgs e)
        {
            if (tabControl1.SelectedTab == tabBrowser)
            {
                IHTMLDocument2 doc2  = browser.Document.DomDocument as IHTMLDocument2;
                IHTMLTxtRange  range = doc2.selection.createRange() as IHTMLTxtRange;
                plainTextSelection = range.text;
                fullHtmlText       = browser.DocumentText;

                HTMLInputFinder helper = new HTMLInputFinder();
                helper.SearchTargetHTML = fullHtmlText;
                helper.SearchFor        = range.htmlText;
                if (helper.Find())
                {
                    htmlTextSelection = helper.FoundHTML;
                    fullHtmlText      = browser.DocumentText;
                }
                else
                {
                    DialogResult userAction = MessageBox.Show("Note: HTML imported may be different from original HTML on the actual web page", "Warning", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning);
                    if (userAction == DialogResult.OK)
                    {
                        plainTextSelection = string.Empty;
                        htmlTextSelection  = range.htmlText;
                        fullHtmlText       = browser.DocumentText;
                        Close();
                    }
                }
            }
            else
            {
                plainTextSelection = string.Empty;
                htmlTextSelection  = txtHtmlView.SelectedText;
                fullHtmlText       = browser.DocumentText;
            }
            Close();
        }