Support » Plugin: Contact Form 7 » Unexpected tags & email markup broken

  • Hello.

    Since one of the recent updates email markup messed up.

    Seems that plugin ads some unexpected <p> tags to markup which breaks it down.

    I saw some topics with the same issue (e.g. here, here or here) but the Author seems to do nothing to solve this problem.

    Markup before updates (worked perfectly):

    Email output after updates:

    I’ve checked my markup with some validators and minified it, but the plugin still generates <p> tags and breaks my markup.

    Does anybody know what to do?

    Thanks in advance.

    • This topic was modified 2 months, 2 weeks ago by anmokuchi.
    • This topic was modified 2 months, 2 weeks ago by anmokuchi.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    Where can we see the website in question?

    Thread Starter anmokuchi

    (@anmokuchi)

    Here is the website (inquiry page from which we suppose to get the data summarized in HTML table), but I’m not sure it will help as an email with the table is sent to site administrator. And many other people experience the same problem, so it is not the case of our site.

    • This reply was modified 2 months, 1 week ago by anmokuchi.
    Thread Starter anmokuchi

    (@anmokuchi)

    Seems that plugin no longer recognizes nested tables (which is actually absolutely valid), so it crashes the whole markup.

    Simplifying your code can help in some way (but I don’t understand why so many users should adapt their valid codes as the plugin update crashes them; probably the Author should think about it and improve it somehow).

    However, it cannot help with unexpected <p> tags which plugin creates in the email markup. As many frontenders know, <p> tag has top and bottom margin values by default, but it cannot be removed via HTML here, as <p> tag is added by plugin.

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    What other plugins and theme do you use on the site?

    Thread Starter anmokuchi

    (@anmokuchi)

    We use Listeo by purethemes on our site.

    And here are the plugins we use:

    All plugins except for Slider Revolution are up to date.

    We updated the theme at November 5, November 25 and December 21.

    As for plugin updates, on December we updated some plugins at December 9, December 12 (including CF7), December 13, December 14, December 16, December 19 (including CF7), December 20, December 26. And the last plugin update was on January 14 (including CF7) due to end of the year holidays.

    I see the problem with unnecessary <p> and <br> tags since December 12, exactly when I updated CF7. They were created on the form page (solved via css-styling) and in emails. In emails from December 12 I see both <p> and <br> tags. When I next updated CF7 on December 19, some unnecessary <br> tags disappeared, but all unexpected <p> tags and even some <br> tags are still here.

    Let’s compare email output before & after update. Here is the email source code before plugin update on December 12 (no <p> and no <br> inside table):

    Here is the email source code after CF7 update on December 12 (8 unnecessary <br> and 14 unnecessary <p> tags on capture):

    And here is the email source code after CF7 update on December 19 (as you can see, unnecessary <br> tags on capture reduced significantly (8 to 2) but still generated, and there is almost no reduce in unnecessary <p> tags (14 to 12, I’m not counting the last one as we cannot see this entry on the capture before)):

    I’ve checked CF7 releases log, and unnecessary <p> and <br> tags was one of the issues reported after the release of version 5.7, and it is supposed to be fixed in 5.7.1. However, as we can see on the captures above, the problem still exists.

    After upgrading to version 5.7.2 (I did it on January 14) unnecessary <br> disappeared, but the plugin messed up all the nested tables (so I had to simplify the markup), and unnecessary <p> tags are still generating. Here is the capture of an email source code after upgrading to 5.7.2.

    It’s absolutely not a problem to add some CSS and change margin values of <p> tag on the website itself, but in case of HTML mail it cannot help, and I don’t understand what happened with nested tables, so I’m just desperate.

    • This reply was modified 2 months, 1 week ago by anmokuchi.
    Thread Starter anmokuchi

    (@anmokuchi)

    Seems that HTML formatter upgrade in version 5.7.2 which includes “Additional end-tag omission handling” cannot recognize nested tables etc. (though it is absolutely valid according to any HTML-validator), so it messes up the whole markup.

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.