Support » Plugin: TablePress » HTML import modifies HTML formatting tags

  • Resolved Benuzar

    (@benuzar)


    Hi,
    I have to export tablepress tables, in order to translate it. The translation tool works with HTML files, thus I export the tables in HTML.
    After translation the HTML code is fine as follows:

    <table>
       <tbody>
    	<tr>
              <td>
                <div title="Wine Red TA 527" class="weinrot">
                  <div class="colorbox">
                  </div>
                  <div class="color rotate">Burgundy
                  </div>
                </div>
              </td>
    	</tr>
        </tbody>
    </table>

    But after importing the HTML code has changed as follows:

    <div title="Wine Red TA 527" class="weinrot">
       <div class="colorbox"/>
       <div class="color rotate">Burgundy
       </div>
     </div>

    The string colorbox"></div> has changed into colorbox"/>.

    It seems to be a bug in the import functionality of TablePress.
    Any help or workaround is welcome.

    • This topic was modified 1 year, 6 months ago by Benuzar. Reason: Code tags changed
    • This topic was modified 1 year, 6 months ago by Benuzar. Reason: Code tags changed
    • This topic was modified 1 year, 6 months ago by Benuzar. Reason: paragraphs inserted
    • This topic was modified 1 year, 6 months ago by Benuzar. Reason: paragraphs inserted
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    <div class="colorbox"/>
    

    is the short-hand for self-closing HTML tags,

    <div class="colorbox"></div>
    

    in this case.

    While this could technically cause problems in HTML5 documents (compared to documents following the XHTML standard), there’s nothing really that I can do about this, as this is all done by the PHP functions for reading HTML code 🙁

    Now, is this actually causing problems somewhere?

    Regards,
    Tobias

    Ahh, I understand, its a matter of HTML5 vs. XHTML.

    I need the HTML end tag of the div-container, because this should be an empty div-container. The empty div-container is necessary to format correct the rotated words within the 2nd row of the table.
    Here you can see the wrong formatted table cell containing the word “Natur”. The other cells in the same row are correct formatted, because they got the HTML end tag for the empty div-container.

    However, now I export the translated table as csv-file. Then I correct the wrong tags in Excel and afterwards I reimport it. That are 3 steps more but work.

    • This reply was modified 1 year, 6 months ago by Benuzar. Reason: typo
    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    Can you please post a link to the page with the table where this problem happens, so that I can take a direct look? Thanks! I’d like to see the influence of this wrong code in the browser DOM.

    Regards,
    Tobias

    Yes, please take a look at here.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks! Indeed, the browser seems to interpret this differently, resulting in the visual error. So, your method of search/replace as an intermediate step is the best here for now.

    Regards,
    Tobias

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘HTML import modifies HTML formatting tags’ is closed to new replies.