Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
teraßyte Posted October 23, 2021 Posted October 23, 2021 (edited) If an email has Our Picks items included there are unreplaced {dir} attributes because the emailWrapper HTML is not formatted properly: {{if $count == 2}} </tr> <tr height='30'> <td colspan='3' dir='{dir}' class='hidePhone' style='border-bottom: 1px solid #e0e0e0;'> <img src='{setting="base_url"}applications/core/interface/email/spacer.png' width='1' height='1' alt=''> </td> </tr> <tr height='30'> <td colspan='3' dir='{dir}' class='hidePhone'> <img src='{setting="base_url"}applications/core/interface/email/spacer.png' width='1' height='1' alt=''> </td> </tr> <tr> {{endif}} <td class='responsive_fullwidth cOurPicksRow' dir='{dir}' width='48%' valign='top' style="font-family: 'Helvetica Neue', helvetica, sans-serif; font-size: 15px;"> This happens because the regex in \IPS\Lang::parseEmail() specifically looks for the {dir} attribute right after the start of a TD element: if ( mb_stristr( $output, '{dir}' ) ) { $output = preg_replace( '#(<td\s+?)dir=([\'"]){dir}([\'"])#i', '\1dir=\2' . $dir . '\3', $output ); Moving the various dir='{dir}' attributes right after <td fixes it: <td dir='{dir}' colspan='3' class='hidePhone' style='border-bottom: 1px solid #e0e0e0;'> <td dir='{dir}' colspan='3' class='hidePhone'> <td dir='{dir}' class='responsive_fullwidth cOurPicksRow' width='48%' valign='top' style="font-family: 'Helvetica Neue', helvetica, sans-serif; font-size: 15px;"> Still, not exactly a reliable way relying on the attributes order in order to parse them properly. The replace code should be updated to work regardless of the order. 👀 Edited October 23, 2021 by teraßyte Daniel F 1
Daniel F Posted October 27, 2021 Posted October 27, 2021 Thanks, I have filled a big report for this.
Solution Stuart Silvester Posted November 15, 2021 Solution Posted November 15, 2021 The fix for this should be in our December release.
Recommended Posts