[PR #19185] [CLOSED] Fixes: #19045 - Add strip method to ScriptVariable to prevent markdown filter crash #15561

Closed
opened 2025-12-30 00:22:44 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/19185
Author: @bctiemann
Created: 4/15/2025
Status: Closed

Base: mainHead: 19045-add-strip-to-StringVar


📝 Commits (1)

  • 517cdf7 Add strip method to ScriptVariable

📊 Changes

1 file changed (+4 additions, -0 deletions)

View changed files

📝 netbox/extras/scripts.py (+4 -0)

📄 Description

Fixes: #19045

Adds a no-op strip method to ScriptVariable so that if such a variable is used in a template along with a template tag/filter such as markdown which calls that method, it silently passes through rather than crashing.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/19185 **Author:** [@bctiemann](https://github.com/bctiemann) **Created:** 4/15/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `19045-add-strip-to-StringVar` --- ### 📝 Commits (1) - [`517cdf7`](https://github.com/netbox-community/netbox/commit/517cdf7c347776bb7daaf86fe7314e9981a5682a) Add strip method to ScriptVariable ### 📊 Changes **1 file changed** (+4 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `netbox/extras/scripts.py` (+4 -0) </details> ### 📄 Description ### Fixes: #19045 Adds a no-op `strip` method to `ScriptVariable` so that if such a variable is used in a template along with a template tag/filter such as `markdown` which calls that method, it silently passes through rather than crashing. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-30 00:22:44 +01:00
adam closed this issue 2025-12-30 00:22:44 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#15561