From 9a35171efd41daa9ee3966b45280820a2915329d Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Fri, 12 Feb 2016 13:41:18 +0000 Subject: [PATCH] fpspreadsheet: Fix writing of hyperlink displaytext with double-quotation characters in xlsx causing an xml read error. Issue #0029640. git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4494 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/fpspreadsheet/xlsxooxml.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/fpspreadsheet/xlsxooxml.pas b/components/fpspreadsheet/xlsxooxml.pas index 438d5fc46..fb6483e12 100755 --- a/components/fpspreadsheet/xlsxooxml.pas +++ b/components/fpspreadsheet/xlsxooxml.pas @@ -2597,7 +2597,7 @@ begin end; if bookmark <> '' then //target = '' then s := Format('%s location="%s"', [s, bookmark]); - txt := AWorksheet.ReadAsUTF8Text(hyperlink^.Row, hyperlink^.Col); + txt := UTF8TextToXMLText(AWorksheet.ReadAsUTF8Text(hyperlink^.Row, hyperlink^.Col)); if (txt <> '') and (txt <> hyperlink^.Target) then s := Format('%s display="%s"', [s, txt]); if hyperlink^.ToolTip <> '' then begin