Markdown in custom field descriptions not rendered in object edit view #8099

Closed
opened 2025-12-29 20:32:22 +01:00 by adam · 4 comments
Owner

Originally created by @decoupca on GitHub (May 23, 2023).

Originally assigned to: @arthanson on GitHub.

NetBox version

v3.5.2

Python version

3.8

Steps to Reproduce

  1. Create a custom field with a description that uses markdown
  2. Assign that custom field to an object type
  3. Create an object of that type
  4. Edit that object

Expected Behavior

Description below custom field should render markdown.

Observed Behavior

Markdown not rendered.

I have a PR ready for this one.

Originally created by @decoupca on GitHub (May 23, 2023). Originally assigned to: @arthanson on GitHub. ### NetBox version v3.5.2 ### Python version 3.8 ### Steps to Reproduce 1. Create a custom field with a description that uses markdown 2. Assign that custom field to an object type 3. Create an object of that type 4. Edit that object ### Expected Behavior Description below custom field should render markdown. ### Observed Behavior Markdown not rendered. I have a PR ready for this one.
adam added the type: bugstatus: acceptedseverity: low labels 2025-12-29 20:32:22 +01:00
adam closed this issue 2025-12-29 20:32:22 +01:00
Author
Owner

@abhi1693 commented on GitHub (May 23, 2023):

I think the fix you have will not only affect custom field description but any other field that relies on render_field. I don't think that would be the intended fix for this issue.

@abhi1693 commented on GitHub (May 23, 2023): I think the fix you have will not only affect custom field description but any other field that relies on `render_field`. I don't think that would be the intended fix for this issue.
Author
Owner

@decoupca commented on GitHub (May 23, 2023):

Would passing a field's help text through the markdown filter incur some unintended side effect? In any case, seems like supporting markdown on all help texts is the direction we want to go?

@decoupca commented on GitHub (May 23, 2023): Would passing a field's help text through the markdown filter incur some unintended side effect? In any case, seems like supporting markdown on all help texts is the direction we want to go?
Author
Owner

@jeremystretch commented on GitHub (May 24, 2023):

Would passing a field's help text through the markdown filter incur some unintended side effect?

Potentially. We should expect that all native help_text strings may contain HTML, so we should avoid processing them as Markdown.

In any case, seems like supporting markdown on all help texts is the direction we want to go?

No; we should only support Markdown for user-sourced content. (Anything built-in will just use HTML directly.)

@jeremystretch commented on GitHub (May 24, 2023): > Would passing a field's help text through the markdown filter incur some unintended side effect? Potentially. We should expect that all native `help_text` strings may contain HTML, so we should avoid processing them as Markdown. > In any case, seems like supporting markdown on all help texts is the direction we want to go? No; we should only support Markdown for user-sourced content. (Anything built-in will just use HTML directly.)
Author
Owner

@decoupca commented on GitHub (May 24, 2023):

Potentially. We should expect that all native help_text strings may contain HTML, so we should avoid processing them as Markdown.

Ah, I see.

Do I then understand correctly that there is not currently a clear path forward to fixing this bug? Sounds like to target only user-sourced content we would need to separate the field rendering templates.

@decoupca commented on GitHub (May 24, 2023): > Potentially. We should expect that all native help_text strings may contain HTML, so we should avoid processing them as Markdown. Ah, I see. Do I then understand correctly that there is not currently a clear path forward to fixing this bug? Sounds like to target only user-sourced content we would need to separate the field rendering templates.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#8099