\&quot; appears as \" inside <p>, <div> or <blockquote> tags

I have an issue rendering quote characters that appear inside of p, div or blockquote tags. However, they render correctly inside of span tag.

I am using the following string. There is a \ character before the &quot; but it doesn’t appear below.

<document><body><span>Line 1 &quot;Test&quot;<span><p style="padding-left: 30px;">Line 2 &quot;Test&quot;</p><p style="padding-left: 60px;">Line 3 &quot;Test&quot;</p><div>Line 4 &quot;Test&quot;</div><blockquote>Line 5 &quot;Test&quot;</blockquote></body></document>

It renders like this:


Line 1 "Test"

	Line 2 \"Test\"

		Line 3 \"Test\"

Line 4 \"Test\"

	Line 5 \"Test\"

But should render like this:


Line 1 "Test"

	Line 2 "Test"

		Line 3 "Test"

Line 4 "Test"

	Line 5 "Test"

My merge field looks like: { QUOTE “{ MERGEFIELD HTML_Text }” }

I am using: DocumentBuilder.InsertHtml(HTMLString, true);

The application uses Aspose Word version 19.1.0

Is there a work-around or fix for this issue?

@jgavin

To ensure a timely and accurate response, please attach the following resources here for testing:

  • Your input Word and HTML documents.
  • Please attach the output Word file that shows the undesired behavior.
  • Please attach the expected output Word file that shows the desired behavior.
  • Please create a standalone console application ( source code without compilation errors ) that helps us to reproduce your problem on our end and attach it here for testing.

As soon as you get these pieces of information ready, we will start investigation into your issue and provide you more information. Thanks for your cooperation.

PS: To attach these resources, please zip and upload them.

The zip file is too large to upload. I have shared it on DropBox: https://www.dropbox.com/s/8wbwtp93hl717z1/Aspose.Words.Quotes.zip?dl=0

@jgavin

We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-20760 . You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

The issues you have found earlier have been fixed in this Aspose.Words for .NET 20.12 update and this Aspose.Words for Java 20.12 update.