Notifications

14 views

Description

If do not include 'http://' or 'https://' within a the HTML hrfef URL, it causes the instance name to be prepended to the beginning of the link.

When you receive the email, links generated by these HTML lines work as expected:

<p><a href="http://www.google.com">www.google.com</a></p>
<p>https://www.google.com</p>

But the links generated without including the protocol (http:// or https://) in the href value result in the instance name being prepended to the URL, breaking the link.

<p><a href="www.google.com">www.google.com</a></p>
<p><a title="www.google.com" href="www.google.com">www.google.com</a></p>

You'll see www.google.com in the email body but the actual links will be non-functional because the instance name will be prepended:
https://<instanceName>.service-now.com/www.google.com

Steps to Reproduce

1. Go to System Policy > Quick Messages.
2. Click New
Name: Testing Quick Message
Active: check this checkbox
Body: Click the Source <> button in the TinyMCE menu.

Paste the following into the HTML source code window:

<p>Work as expected:</p>
<p>&nbsp;</p>
<p><a href="http://www.google.com">www.google.com</a></p>
<p>https://www.google.com</p>
<p>&nbsp;</p>
<p>Prepend instance URL (links not working):</p>
<p>&nbsp;</p>
<p><a href="www.google.com">www.google.com</a></p>
<p>&nbsp;</p>
<p><a title="www.google.com" href="www.google.com">www.google.com</a></p>
<p>&nbsp;</p>

3. Click OK.
4. Click Submit.
5. Open any active incident record.
6. Click the More options button (the button with the three horizontal circles) in the header bar.
7. Select Email.
8. From the Quick Messages dropdown menu, select Testing Quick Message.
9. Add your own email address to the To field. (You can remove other recipients.)
10. Click Send.

Assuming that the instance has Outbound email enabled, when you get the email, you'll see that the links generated by these HTML lines work as expected:

<p><a href="http://www.google.com">www.google.com</a></p>
<p>https://www.google.com</p>

But the links generated without including the protocol (http:// or https://) in the href value result in the instance name being prepended to the URL, breaking the link.

<p><a href="www.google.com">www.google.com</a></p>
<p><a title="www.google.com" href="www.google.com">www.google.com</a></p>

You'll see www.google.com in the email body but the actual links will be non-functional because the instance name will be prepended:
https://<instanceName>.service-now.com/www.google.com

Workaround

This is as-designed behavior.

Use absolute paths in your email HTML references for any external-to-instance URLs.


Related Problem: PRB1357852

Seen In

There is no data to report.

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2020-03-24 12:36:58
Published:2020-03-24