createWindowsNotification doesn't add X-WNS-Type header when the message body has xml prolog
daatlk opened this issue · 1 comments
daatlk commented
This method has been changed recently to replace contains checks with regex.
However a regex like "^<toast[\s\S]*>[\s\S]+$" does not match when the message body has a xml prolog. Also noted this regex seems correct in other languages.
ex message body from test send in Azure portal
<?xml version="1.0" encoding="utf-8"?>
<toast>
<visual><binding template="ToastText01">
<text id="1">Test message</text>
</binding>
</visual>
</toast>
Tried "\s*<toast[\s\S]*>[\s\S]+$" and it seems to work with java regex.
mpodwysocki commented
Closed as per #90