Issue #118 resolved

Unescaped characters remain in displayed fragments

Martin Robillard
created an issue

Some HTML characters such as '&' do not get properly escaped by the FragmetViewer, which attempts to display them as links. This results in an exception in the Fragment viewer (exception stack below).

To reproduce:

Create a new transcript. In the new transcript, add the sentence: "This & will cause a problem".

Select the sentence, right-click, and select "Add Code" and make a new code, e.g., "Problem"

Double-click on the code viewer, select "Problem", right-click, and select View Associated Fragments

Witness the problem.

Stack trace:

java.lang.IllegalArgumentException: Argument not valid The entity name must immediately follow the '&' in the entity reference. at org.eclipse.swt.SWT.error(SWT.java:3865) at org.eclipse.ui.internal.forms.widgets.FormTextModel.parseInputStream(FormTextModel.java:133) at org.eclipse.ui.internal.forms.widgets.FormTextModel.parseTaggedText(FormTextModel.java:111) at org.eclipse.ui.forms.widgets.FormText.setText(FormText.java:673) at ca.mcgill.cs.swevo.qualyzer.editors.pages.CodeFragmentViewerPage.createTextBox(CodeFragmentViewerPage.java:228) at ca.mcgill.cs.swevo.qualyzer.editors.pages.CodeFragmentViewerPage.buildSection(CodeFragmentViewerPage.java:185) at ca.mcgill.cs.swevo.qualyzer.editors.pages.CodeFragmentViewerPage.createFormContent(CodeFragmentViewerPage.java:111) at org.eclipse.ui.forms.editor.FormPage$1.run(FormPage.java:152) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.ui.forms.editor.FormPage.createPartControl(FormPage.java:150) at org.eclipse.ui.forms.editor.FormEditor.pageChange(FormEditor.java:465)

Comments (7)

  1. Log in to comment