Page 1 of 1

Gmail link including "amp;" next to &

Posted: February 4th, 2018, 3:51 pm
by Virginityrocks
Webparser is pulling:

Code: Select all

https://mail.google.com/mail?account_id=#USER#@gmail.com&message_id=1615e2330948dd9b&view=conv&extsrc=atom
When it should be pulling:

Code: Select all

https://mail.google.com/mail?account_id=#USER#@gmail.com&message_id=1615e2330948dd9b&view=conv&extsrc=atom
The first link doesn't go to the correct message because it includes amp; next to the & symbols. I imagine this has something to do with the encoding, but changing the encoding doesn't seem to be helping. Currently set to UTF 16 LE.

Thanks.

Re: Gmail link including "amp;" next to &

Posted: February 4th, 2018, 3:56 pm
by jsmorley
HTML character references are not supported in URLs. Encoding & in a URL would be with %26.

Re: Gmail link including "amp;" next to &

Posted: February 4th, 2018, 3:58 pm
by ikarus1969
& ist the HTML-code for the ampersand.

Would you try DecodeCharacterReference=1 on the WebParser- measure?

According to the docs it should decode the & to &.

Re: Gmail link including "amp;" next to &

Posted: February 4th, 2018, 4:03 pm
by jsmorley
ikarus1969 wrote:& ist the HTML-code for the ampersand.

Would you try DecodeCharacterReference=1 on the WebParser- measure?

According to the docs it should decode the & to &.
Yes, if the idea is that that link is being parsed from your gmail account, and then you want to be able to display and click on the link to go to the message in your browser, then you need DecodeCharacterReference=1 on the child WebParser measure returning the link, so the & is changed to just & before the URL is sent by clicking the link. HTML character references like & or " are not supported in URLs in your browser.

https://docs.rainmeter.net/manual/plugins/webparser/#DecodeCharacterReference