Free Support Forum -

How do I escape special characters using ASPOSE.Word?


I’m attempting to convert Word documents into HTML using ASPOSE Word (v4.0.0). Mostly it is working fine, with the exception of double quote characters (’"’) are not getting escaped to something like " Is there a way to turn this functionality on?


In my test, I’ve surrounded selected words with double-quotes. The code used looks like this:

SaveOptions saveOptions = document.getSaveOptions();

System.out.println(“Set document save options.”);

try {, SaveFormat.HTML);
} catch (Exception e) {
System.out.println(“Unable to save docuemnt.”);
throw new Exception(“Unable to save document”, e);

One of the resulting generated snipets:
In the “science experiment” shown here, it was
determined that when placing cold and hot water into water at room
temperature, cold water sank, while the hot water rose to the

Based on this result,
which of the responses below accurately completes the

Note the double-quotes around
the words “science experiment”. I would have expected to see something
like " replacing the double-quotes.


<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your request. It is allowed to use double quotes within text between tags.

<p><span>HTML quotes: "test"</span></p>

Double quotes should be escaped if they occur within double quotes, i.e. in tag attributes. See the following example:

<input type="text" name="Text1" value="test "test" test" />

Best regards.