Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
decoupca opened this issue May 23, 2023 · 4 comments · Fixed by #13828
Closed

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

decoupca opened this issue May 23, 2023 · 4 comments · Fixed by #13828
Assignees
Labels
severity: low Does not significantly disrupt application functionality, or a workaround is available status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@decoupca
Copy link
Contributor

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.

@decoupca decoupca added the type: bug A confirmed report of unexpected behavior in the application label May 23, 2023
decoupca added a commit to decoupca/netbox that referenced this issue May 23, 2023
@abhi1693
Copy link
Member

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.

@decoupca
Copy link
Contributor Author

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?

@jeremystretch
Copy link
Member

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 jeremystretch added the status: under review Further discussion is needed to determine this issue's scope and/or implementation label May 24, 2023
@decoupca
Copy link
Contributor Author

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.

@jeremystretch jeremystretch added the severity: low Does not significantly disrupt application functionality, or a workaround is available label Jun 23, 2023
@arthanson arthanson self-assigned this Sep 19, 2023
@jeremystretch jeremystretch added status: accepted This issue has been accepted for implementation and removed status: under review Further discussion is needed to determine this issue's scope and/or implementation labels Sep 20, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
severity: low Does not significantly disrupt application functionality, or a workaround is available status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants