Skip to content
Snippets Groups Projects
Commit 928fbed3 authored by srosse's avatar srosse
Browse files

OO-3531: replace tag <u /> with styled <span /> in QTI 2.1 editor

parent 58af24ae
No related branches found
No related tags found
No related merge requests found
......@@ -243,6 +243,12 @@ public class AssessmentHtmlBuilder {
video = true;
return;
}
} else if("u".equals(localName)) {
qName = "span";
AttributesImpl underlineAttributes = new AttributesImpl("");
underlineAttributes.addAttributes(attributes);
underlineAttributes.addAttribute("style", "text-decoration: underline;");
attributes = underlineAttributes;
}
super.startElement(uri, localName, qName, attributes);
}
......@@ -339,6 +345,14 @@ public class AssessmentHtmlBuilder {
this.attributesUri = uri;
}
public void addAttributes(Attributes attributes) {
for(int i=0; i<attributes.getLength(); i++) {
String name = attributes.getLocalName(i);
String value = attributes.getValue(i);
addAttribute(name, value);
}
}
public void addAttribute(String name, String value) {
attributes.add(new AttributeImpl(name, value));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment