Closed bajabob closed 2 years ago
HI Bob,
I believe you can achieve a similar output to your PR changes by just wrapping your image url inside the existing cdata
function. Depending on how your are adding the <image:loc>
element, you should be able to do something like this:
"image:loc" {
cdata("https://unencodedurl.org?var1=test&var2=othertest")
}
That will wrap the tag in a CDATA which will stop the encoding.
Let me know if that works for you.
-Jason
That will work @redundent ! Thanks. Closing this.
Hello,
I stumbled across this wonderful project while building out a sitemap. As you may know, a sitemap is typically constructed in XML and is of the (basic) form:
I have found no issues using this framework to generate this file, except one. When placing my image url's I am seeing string encoding that is not needed.
Original string (example, not actually working):
Output with Kotlin XML Builder:
Using this print option:
Adds
&
to the URLAnd using this print option:
Adds
&
to the url.Neither of which are valid, breaking the url from being able to work properly. I have also attempted to employ workarounds trying URL Encoding/Decoding before priming the XML Builder. Ultimately the URL needs to be represented in its original form, unchanged. If this is something that already exists in the framework, I have missed it. Please let me know your thoughts.
Regards,
Bob