Skip to content

Make sure Element (e.g. component) names do not include carriage returns #179

Description

@gregelin

Bug

Make sure Element names do not include carriage returns. Sanitize Element name to remove carriage returns in content.

To Reproduce

This may be difficult to reproduce. Possibly reproduce by creating a component via Django shell and saving it. The Django admin pages naturally clear carriage returns.

The problem happened from the NLP processing that discovered new components. When an Element name contained a new line, the new line created an error in generating the javascript inside a Django template.

Dayton discovered the error with the Components named "Appendix I" and "Appendix T" and Greg diagnosed issue.

Expected behavior

Element names do not cause a problem for templates or javascript in templates. Element name and description can be edited via modal.

Developer hints

  • hint

Acceptance criteria

  • criteria

Reference

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions