Bug: SyntaxError: Unexpected token '<' when adding Custom JavaScript #1335

Closed
opened 2026-04-05 16:26:54 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @TheDoubleH on 12/6/2023

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Status Pages / Page / </> HTML, CSS & JavaScript / Custom JavaScript
  2. Click on 'Edit tatus Page'
  3. Scroll down to Add a Line: <script src="https://app.usermetric.io/pixel/SomeSecretValueHere" defer></script>
  4. When opening my public status page I get the error "SyntaxError: Unexpected token '<'"

Expected behavior
Status Page should render, and my usermetric tracking should be executed

Screenshots
image

image

Desktop (please complete the following information):

  • OS: [Windows 11]
  • Browser [Edge]
  • Version [Version 119.0.2151.93 (Official build) (64-bit)]

Deployment Type
SaaS (at https://oneuptime.com)

*Originally created by @TheDoubleH on 12/6/2023* **Describe the bug** A clear and concise description of what the bug is. **To Reproduce** Steps to reproduce the behavior: 1. Go to 'Status Pages / Page / </> HTML, CSS & JavaScript / Custom JavaScript 2. Click on 'Edit tatus Page' 3. Scroll down to Add a Line: `<script src="https://app.usermetric.io/pixel/SomeSecretValueHere" defer></script>` 4. When opening my public status page I get the error "SyntaxError: Unexpected token '<'" **Expected behavior** Status Page should render, and my usermetric tracking should be executed **Screenshots** ![image](https://github.com/OneUptime/oneuptime/assets/24259184/fae91f00-1d20-473f-9b1e-ed0fc6dbc2b9) ![image](https://github.com/OneUptime/oneuptime/assets/24259184/cdedc2bf-7f7b-4534-82dc-ad9a3024dd0f) **Desktop (please complete the following information):** - OS: [Windows 11] - Browser [Edge] - Version [Version 119.0.2151.93 (Official build) (64-bit)] **Deployment Type** SaaS (at https://oneuptime.com)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/oneuptime#1335