annotManager.exportAnnotCommand() fails when a URL is placed in the annotation comment box

WebViewer Version: 8.2.0

Do you have an issue with a specific file(s)? no
Can you reproduce using one of our samples or online demos? no
Are you using the WebViewer server? no
Does the issue only happen on certain browsers? no
Is your issue related to a front-end framework? no

Is your issue related to annotations? yes

Please give a brief summary of your issue:
annotManager.exportAnnotCommand() fails when a URL is placed in the annotation comment box

Please describe your issue and provide steps to reproduce it:

1.) Setup a webviewer instance to have an event handler for the annotationChanged event, and in that event call the exportAnnotCommand function.

        annotManager.addEventListener('annotationChanged', async (annotations, type, { imported }) => {

            const xfdf = await annotManager.exportAnnotCommand();

            for (var i = 0; i < annotations.length; i++) {
                let annotation = annotations[i];

                if (type === 'add') {

            //.... 

2.) Input the URL below in any annotation’s comment box:

https://test.com/_layouts/15/Doc.aspx?sourcedoc=%7BA2C53F40-29D8-4840-8880-7DC837A1C79D%7D&file=PC%20xxx%20-%20XXX%20WBS.xlsx&action=default&mobileredirect=true

3.) Click the save button

image

4.) And the error will occur

5.) I found out that the issue occurs when the exportAnnotCommand function is called

Please provide a link to a minimal sample where the issue is reproducible:
N/A

Thanks for the detailed steps!

I tried reproducing this in WebViewer 10 and 8 .12. It seems this issue may have already been addressed as I cannot reproduce the issue.

I would recommend updating to a later version of WebViewer and see whether your issue has been fixed.