Skip to content

[FIX] Use simple_format when rendering Participatory Text.#4782

Merged
oriolgual merged 5 commits intomasterfrom
fix/4767-line_breaks_in_participatory_text_public_view
Jan 28, 2019
Merged

[FIX] Use simple_format when rendering Participatory Text.#4782
oriolgual merged 5 commits intomasterfrom
fix/4767-line_breaks_in_participatory_text_public_view

Conversation

@tramuntanal
Copy link
Copy Markdown
Contributor

@tramuntanal tramuntanal commented Jan 23, 2019

🎩 What? Why?

Public view of Participatory Text is not preserving new lines.

📌 Related Issues

📋 Subtasks

  • Add CHANGELOG entry
  • [-] Add documentation regarding the feature
  • [-] Add/modify seeds
  • [-] Add tests
  • Task

📷 Screenshots (optional)

First paragraph is multiline now:
participatory_text-evols

@ghost ghost assigned tramuntanal Jan 23, 2019
@ghost ghost added the status: WIP label Jan 23, 2019
def body
return unless model.participatory_text_level == "article"
present(model).body
simple_format present(model).body(links: true)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would not it be better to use the decidim_sanitize method instead of the simple_format?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah! But both should be applied, one after the other.

@tramuntanal
Copy link
Copy Markdown
Contributor Author

Hi @decidim/lot-core codeclimate/diff-coverage has not executed. Can you force it to re-run? I don't have permissions.

@oriolgual
Copy link
Copy Markdown
Contributor

I don't see a way to re-run it @tramuntanal, although we can by pass it, don't worry.

@tramuntanal tramuntanal force-pushed the fix/4767-line_breaks_in_participatory_text_public_view branch from 0d05126 to 1d37541 Compare January 24, 2019 16:21
@ghost ghost added the status: WIP label Jan 25, 2019
@oriolgual oriolgual merged commit 2960380 into master Jan 28, 2019
@oriolgual oriolgual deleted the fix/4767-line_breaks_in_participatory_text_public_view branch January 28, 2019 09:52
@ghost ghost removed the status: WIP label Jan 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants