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

linebreaks|safe #5

Open
shacker opened this issue Dec 2, 2009 · 0 comments
Open

linebreaks|safe #5

shacker opened this issue Dec 2, 2009 · 0 comments

Comments

@shacker
Copy link

shacker commented Dec 2, 2009

I'm having trouble working out a way to use process_inlines in combination with with filters like linebreaks. Consider these three scenarios:

{% process_inlines item.story %}

Works, but other text in item.story does not get | linebreaks functionality.

{% process_inlines item.story as story %}
{{story|linebreaks|safe}}

linebreaks in text happen correctly but video embed code is displayed, not rendered.

{% process_inlines item.story as story %}
{{story|safe|linebreaks}}

linebreaks work and video embed is rendered, but if you view source you'll see that br tags are inserted after each line of embed code, and the block is inside a div inside a paragraph.

Is there a way to prevent linebreaks from operating on the code generated by process_inlines?

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant