Skip to content

Phone numbers in tel: URLs contain spaces in contravention of RFC3966 #16460

@pv2b

Description

@pv2b

Deployment Type

Self-hosted

NetBox Version

v4.0.3

Python Version

3.11

Steps to Reproduce

  1. Set the phone number for a contact to a number with spaces, e.x. +1 800 123 45 67
  2. Go to the contact detail page and hover over the phone number, and observe the link generated. (This also applies to the contact list table.)

Expected Behavior

The URL generated should be tel:+18001234567, removing spaces as per RFC3966 section 5.1.1:

However, even though ITU-T E.123 [E.123] recommends the use of space characters as visual separators in printed telephone numbers, "tel" URIs MUST NOT use spaces in visual separators to avoid excessive escaping.

Observed Behavior

The URL generated is actually tel:+1 800 123 45 67 which neither strips nor URL-encodes the spaces.

Inspecting the HTML code would show something like:

<a href="tel:+1 800 123 45 67">+1 800 123 45 67</a>

Metadata

Metadata

Assignees

Labels

severity: lowDoes not significantly disrupt application functionality, or a workaround is availablestatus: acceptedThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the application

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions