1

as we all know, creating RTF from a RichTextBox / FlowDocument is quite easy:

[...]
someTextRange.Save(stream, DataFormats.Rtf);
[...]

However, when using special characters in Hyperlink Targets, those characters are replaced by some (xml encoded?) characters leading to a broken link when using the rtf later on. It's even not possible to convert back to rtf (using the well known method via TextRange.Load) because the URI creation fails.

The strange thing is that those special characters are not replaced if they're used in normal text or the Hyperlink display text. Only characters in the URI itself are replaced.

Example:

Link Target

www.test.com/this&that (

is converted to (without spaces)

www.test.com/this& amp ;that

Any ideas?

Thanks in advance,

Henning

Lumo
  • 627
  • 6
  • 21

0 Answers0