wielebenwir / cb-legacy

Wordpress plugin for managing and booking of common goods. New Version 2: https://github.com/wielebenwir/commonsbooking
http://www.wielebenwir.de/projekte/commons-booking
GNU General Public License v2.0
22 stars 12 forks source link

Shortcode returns invalid HTML #137

Closed flegfleg closed 7 years ago

flegfleg commented 7 years ago

Originally reported by: Ralph W (Bitbucket: ralphW, GitHub: ralphW)


When using a shortcode, the page is not proper HTML anymore.

https://validator.w3.org/ says:

This seems to be caused by the use of a shortcode.

 [cb_items p=somenumber]

The code looks like this:

#!html

<p><div class="cb-item-wrapper cb-box" id ="item_id15">   <h2 class="cb-big"><a href="https://klara.bike/cb-items/klara-lastenrad">Klara Lastenrad</a></h2>
    <div class="cb-list-item-description">
                Zweirädriges Lastenrad mit Zuladung von 185 kg (inkl. Fahrer)    </div>

<div class="cb-table">
      <div class="cb-row" id="timeframe_id_27">
        <a href="xxxxx" class="cb-button align-right"> Hier buchen</a>
        <span class="cb-date">14.11.16 - 13.01.17</span> <span class="cb-timeframe-title"></span>
        <span class="cb-location-name">yyyyy</span>
        <span class="cb-address">zzzzzzz</span>
    </div>
    </div>
</div><br />
&nbsp;</p>

I suggest to remove all the html code outside the DIVs (first p, br, nbsp, last p).


flegfleg commented 7 years ago

Original comment by Florian Egermann (Bitbucket: flegfleg, GitHub: flegfleg):


Wordpress/Plugins modify the output. Here´s a stackoverflow post: http://stackoverflow.com/questions/6625458/removing-p-and-br-tags-in-wordpress-posts

flegfleg commented 7 years ago

Original comment by Ralph W (Bitbucket: ralphW, GitHub: ralphW):


This thing is a bit more complicated. I was not always able to reproduce this. It seems to be connected to other WP plugins that we use for layouting pages.

If you want, we can look into it together. Otherwise please close the ticket.

flegfleg commented 7 years ago

Original comment by Florian Egermann (Bitbucket: flegfleg, GitHub: flegfleg):


will look into it