Problem/Motivation

Nothing gets injected into body if paragraphs have attributes and are not plain

Steps to reproduce

Experiment with body text with versions of paragraphs like this:

<p>asdfasdfadf</p> and <p class="some class">

The latter will get ignored.
If all your paragraphs have attributes nothing will get injected. If only some - injection may happen but not where you want it.

Example:

<p class="p1">
    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore 
</p>
<p class="p1">
    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore.
</p>

Proposed resolution

Change paragraphs 'exploding' pattern

Comments

masterperoo created an issue. See original summary.

marcoka’s picture

What is meant wit hattributes 0?

masterperoo’s picture

Issue summary: View changes

@marcoka
It was typo in description. I have now made changes

masterperoo’s picture

Issue summary: View changes
masterperoo’s picture

A patch that seems to work for me

masterperoo’s picture

Title: Nothing injected when paragraphs have attributes attribute » Nothing injected when paragraphs have attributes

  • marcoka committed b7dc078b on 1.1.x
    Issue #3433170: Nothing injected when paragraphs have attributes
    
marcoka’s picture

Thank you. has been pushed and i add it to the new 1.2.x

mlncn’s picture

Version: 1.1.1-beta1 » 1.1.x-dev
Status: Active » Needs work

This change is breaking body inject on one of our sites, causing the div we are injecting to be put inside a paragraph tag that then never closes:

<p<div class="body-inject body-inject-simple_block:example">
<div>Example stuff</div>
</div>

(That is, the paragraph never closes if you view source. Browsers resolve the open paragraph by closing it into the div bizarrely like this: </p<div>.)

  • mlncn committed 6c1b5fd7 on 1.1.x
    Revert "Issue #3433170: Nothing injected when paragraphs have attributes...
marcoka’s picture

i can confirm this. patch is not sufficient and causes a new problem with stray p-tags.i am reverting this in the latest beta.