Text format node removes block inject tags

Created on 9 September 2024, 3 months ago

Hello! When adding a block with advertising, I created a new text format and disabled all filters. But the block tags are still deleted. I found out that if I make the text output format of the node itself - PHP, then the banner will be displayed. It turns out that the text format of the node cuts the code of the inject block.

Please tell me how I can configure it so that the block is displayed?

πŸ› Bug report
Status

Active

Version

1.1

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @kovalevm
  • πŸ‡©πŸ‡ͺGermany marcoka

    I can not exactly follow here. Can you describe that in detail please?
    The module injects a block. If you disable html and the block has html...it may not work because it gets filtered.

  • 1. I created a new text format for inserting the banner code - Banner, in this format I disabled all filters.
    2. In BodyInject profiles I added a profile. Block to inject - selected the desired block, Node Type to use on - selected the Node Type.
    The text format of this Node Type is Default, tags like

    are prohibited. As a result, it turns out that the banner on the page of this node is not displayed, since the text format of the editor cuts off this code. If you make the text format of the PHP node, the banner code is not cut off. But in theory, this is a Block in a Block, the format of the text editor of the node should not affect the display of Block to inject.
  • πŸ‡©πŸ‡ͺGermany marcoka

    I also inject banners like that i use full html for that. It works.

  • πŸ‡·πŸ‡ΊRussia xandeadx

    Module inject code to non-processed node body text. After inject, body text processed by node text format, and if node text format contains filter "Limit allowed HTML tags and correct faulty HTML" then injected code becomes cleansed.

  • Please help me solve the problem. As xandeadx wrote above:

    After inserting the body text, it is processed by the node text format (node ​​text format != block text format), and if the node text format contains the filter "Restrict allowed HTML tags and fix broken HTML", then the inserted code is cleared.

    My node text format clears the code of your module inserted into it. This should not happen.

  • I really ask you to help, the block with advertising is really not added inside the article, all html tags are cut out by the article editor. Any meaning of the module is lost.

  • πŸ‡©πŸ‡ͺGermany marcoka

    Use full HTML and allow html tags.

  • In this case, I will have to change the format from Default to Full Html on all my 8000 articles on the site. Also, for a regular user, html should be prohibited in the Blog. In the Body Inject version for Drupl 7, there was no such problem with the module. HTML tags were not cut off by the text format of the article. Please help!

  • πŸ‡©πŸ‡ͺGermany marcoka

    You can try to rearrange the filter sorting on the text format page.

  • Please tell me the order of filters that will not cut off your HTML tags.

  • @marcoka, help me please!

Production build 0.71.5 2024