Click here to Skip to main content
14,331,836 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hello Friends,
I am creating IE BHO in which Browser words that matched with database gets highlight and onmousehover description is getting displayed as popup. Till now everything is running fine.
Below is my code
oleda.SelectCommand = cmd;
                // Filling OleDataAdapter value in DataTable Object dt
                if (dt.Rows.Count > 0)
                    string TextToHighlight = "", TextAsDiscription = "";
                    int count = dt.Rows.Count;
                    for (i = 0; i < count; i++)
                        TextToHighlight = "";
                        TextAsDiscription = "";
                        TextToHighlight = dt.Rows[i]["words"].ToString().ToLower();
                        TextAsDiscription = dt.Rows[i]["Definition"].ToString().ToLower();
                        if (Regex.IsMatch(PageText, string.Format(@"\b({0})\b", TextToHighlight)))
                            PageText = HighlightSearchKeyWords(TextToHighlight, TextAsDiscription, PageText);
                            MatchedWords = MatchedWords + TextToHighlight + ",";
                document.body.innerHTML = PageText;

My problem is in Pagetext variable complete data is coming along with Single quotes in word description but after assign to document.body.innerHTML, words description getting truncated after single quotes.

Can anybody suggest me the issue or any solution for this.

Please help me in sorting out this issue.

Updated 23-Sep-12 21:38pm

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100