lukasjarosch / go-docx

Replace placeholders inside docx documents with speed and confidence.
MIT License
204 stars 47 forks source link

v0.4.6 can not replace with ampersand `&`. #22

Closed lnwsit closed 1 year ago

lnwsit commented 1 year ago

In version v0.4.6 can not replace string contain & (ampersand) such as

code

docx.PlaceholderMap{
     "company":  "Test & test"
}

word {company}

but v0.4.4 it work

lukasjarosch commented 1 year ago

Thank you very much for reporting this ❤️

This is most likely due me forgetting to re-add html escaping here.

I've checked and re-added the esacping and ampersand replacing seems to be working again. This should be resolved in v0.4.7.

Thank you for using go-docx, feel free to open more issues as they arise 😃