Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix LT-10373: Try a Word crashes for double quote and angle bracket #75

Merged
merged 6 commits into from
Jun 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Src/LexText/ParserUI/TryAWordDlg.cs
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,8 @@ private void m_tryItButton_Click(object sender, EventArgs e)
// Display a "processing" message (and include info on how to improve the results)
var uri = new Uri(Path.Combine(TransformPath, "WhileTracing.htm"));
m_htmlControl.URL = uri.AbsoluteUri;
sWord = new System.Xml.Linq.XText(sWord).ToString(); // LT-10373 XML special characters cause a crash; change it so HTML/XML works
sWord = sWord.Replace("\"", """); // LT-10373 same for double quote
sWord = sWord.Replace(' ', '.'); // LT-7334 to allow for phrases; do this at the last minute
m_parserListener.Connection.TryAWordDialogIsRunning = true; // make sure this is set properly
m_tryAWordResult = m_parserListener.Connection.BeginTryAWord(sWord, DoTrace, selectedTraceMorphs);
Expand Down
Loading