I want to prevent the contents in annotation from being surrounded by <a>

WebViewer Version:10.9.0

Do you have an issue with a specific file(s)?
No

Can you reproduce using one of our samples or online demos?
Yes

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:
(Think of this as an email subject)
I want to prevent the contents in annotation from being surrounded by .

Please describe your issue and provide steps to reproduce it:
(The more descriptive your answer, the faster we are able to help you)

I use CustomAnnotation extending AttatchmentAnnotation.
When the CustomAnnotation is attached a file, write this file name in the contents of that annotation.
Basically the written file name isn’t surrounded by
, but a zip file is surronuded by .

I want to prevent the contents in annotation from being surrounded by .

Can the contents in annotation be prevented from being surrounded by ?
If it can , can the only contents including “.zip” be prevented from being surrounded by
?

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

  1. Add an annotation.
    2.Write “test.zip” in the contents of this annotation

image

1 Like

Hello @harada.ryosuke,

Thank you for posting on our forum,

After some testing, we were able to reproduce the behavior you were describing on our end. This seems to be an unexpected behavior, as this only seems to happen with words ending in “.zip”, and not other file extensions.

We have raised this issue and have added it to our backlog for our Product team to review.

We do not have a firm timeline at this moment when the issue will be worked on, but we will be sure to reach out if we have an update to provide.

Thank you for bringing this to our attention.

Best Regards,
Jacob Romano Carlsen
Web Development Support Engineer
Apryse Software Inc.

2 Likes

Hello Jacob

Thank you for your confirmation.
I understood that it is an unexpected behavior that “.zip” becomes a link.

I also understood that this will be improved in a future release, but is there any way to prevent it from becoming a link at this time?

If there is a way does not allow any characters to become a link, i want to know it.

Thank you and best regards,

1 Like

Hello @harada.ryosuke,

After some initial testing, we were unable to find a workaround at this time.

We will be sure to let you know once we have an update, including if we have found a workaround.

Thank you for your patience.

Best Regards,
Jacob Romano Carlsen
Web Development Support Engineer
Apryse Software Inc.

1 Like

Hello Jacob,

Thank you for your reply.

Now I understand that no workaround has been found at this time.

I will wait until you contact me.

Thank you and best regards,

1 Like

Hello @harada.ryosuke,

Thank you for your patience. After further review from the development team, they found that this is actually expected behavior. The phrase “.zip” is a valid TLD (Top-Level Domain. For example, “.com”, “.net”, “.org”), and is therefore expected to be flagged as a redirectable URL.

Another example would be if you typed “google.com” as a comment, it would get surrounded in an just like phrases with “.zip”.

Let us know if you need further clarification.

Best Regards,
Jacob Romano Carlsen
Web Development Support Engineer
Apryse Software Inc.

1 Like

Hello Jacob

Thank you for .
I understood that it is a specification that “.zip” becomes a link.

I would like to prevent comments containing “.zip” from being enclosed in .

Is there a way to achieve this?
Or do I have to give up?

If it is not possible to do this just for “.zip”, I would be happy to know if there is a way to prevent flagging of the top-level domain.

Thank you and best regards,

1 Like

Hello @harada.ryosuke,

Currently we only support removing autolinking for StickyNoteAnnotations. For this type of annotation, you can use setCustomData() to set the ‘trn-skip-auto-link’ key to ‘true’.

Before:

After ‘trn-skip-auto-link’ key to ‘true’:

Other annotations do not have this behavior with ‘trn-skip-auto-link’, so you would need to fork our public UI in order to modify how the Notes Panel functions. For more information, see our guide here: https://docs.apryse.com/web/guides/advanced-customization

If you would like to go this route, you can find the logic for auto-linking the comments in the file here: https://github.com/ApryseSDK/webviewer-ui/blob/11.4/src/components/NoteContent/NoteContent.js#L141-L168

Let us know if you need further clarification.

Best Regards,
Jacob Romano Carlsen
Web Development Support Engineer
Apryse Software Inc.

1 Like

Hello Jacob,

Thank you for checking.
I will try to see if I can make it happen based on what you have provided.

Thank you and best regards,

2 Likes