Is there a way to override stripping of display:none elements?

Working on this page - https://www.saechsische.de/plus/strassen-reinigung-sauberkeit-stadtbild-rothenburg-5234224.html - there is article text available in an element towards the end <div id="article-content-bottom" style="display-none">

But I think this is being stripped. In Debug I see:

  • Stripping 1 elements with inline display:none style

Is there a way to stop that?

Thanks!

I don’t see the style attribute on that element, so I’m not sure that’s what’s being stripped. If I view the page source I see:

<div id="article-content-bottom">
  <p>Hartmut Steinert hat die Nase voll. Und sieht die Kommune...

Remember, if you’re using your browser’s web developer tools to inspect elements, you may see elements and attributes that have been inserted by Javascript into the original page source. Full-Text RSS doesn’t see any of that, so to see what Full-Text RSS sees, you should right click on the page and click ‘View Page Source’. Then you’ll be viewing the HTML as sent by the server without the Javascript that may be executed later on meddling with the page.

If I use Full-Text RSS on this page, that element is included in the output. You can test with our public version at http://ftr.fivefilters.org.

Ah yes, I see that now too. I’m still not seeing the content returned though, but we have a mildly odd setup.

However, is there an override to prevent stripping of display:none, or is it hard coded in?

Because it’s rare that we have to do it, there’s no easy override. But in cases where you do need to do it, you can create a site config file for the site and use the find_string and replace_string directives to remove the display:none string from the HTML.

For example:

find_string: display:none
replace_string: display-disabled:none

(Leaving the replace_string value blank should work too.)

We suggest making it more specific if possible. For example:

find_string: <div class="xyz" style="display:none
replace_string: <div class="xyz" style="

The find/replace string directives are executed before Full-Text RSS looks for display:none elements to remove, so by changing the string or removing it, you’ll be preserving those elements for Full-Text RSS.

You can also pass these in the querystring using the siteconfig parameter. You’ll have to URL encode them first though. For example:

?url=...&siteconfig=find_string%3A%20display%3Anone%0Areplace_string%3A

Hope that’s some help.

Thanks, will try that.

1 Like