Email Template - Ne...
 
Notifications
Clear all

Limited Support

Our team is currently on holiday, so support will be limited during this period. Response times may be slower than usual, and some inquiries may be delayed.
We appreciate your patience and understanding, and we’ll resume our usual support by the end of August.

 

[Solved] Email Template - New Topic Notification-Font Size is not saved

3 Posts
2 Users
0 Reactions
1,836 Views
Posts: 5
Topic starter
(@steffeng)
Active Member
Joined: 3 years ago

Set font size disappears after "Safe Option".

Examble Set Font Size 16 bevor saving

<p style="font-family: arial;"><span style="font-size: 16px;">Hallo [user_display_name],</span></p><p><span style="font-size: 16px;">in Ihrem abonnierten Fachthema wurde ein neues Thema erstellt.</span></p>

after saving

<p style="font-family: arial;">Hallo [user_display_name],</p><p>in Ihrem abonnierten Fachthema wurde ein neues Thema erstellt.</p>

So need a little help 😉

2 Replies
Chris
Posts: 3611
(@chris)
Famed Member
Joined: 4 years ago

Hi @steffeng,

Emails are filtered for HTML codes. The <span> tag is not allowed in email content as it is not a Post content. It should be secure and clean. This will help emails to pass more antispam systems of Email servers.

The default WordPress emails doesn't have HTML tags, we added a few secure tags (formatting tags and link).

By default, allowed tags are: 'a', 'img', 'blockquote', 'h1-h5','hr', 'br',  'p', 'style', 'strong'.

However, you can use the below code to allow all tags to work.

Put this code in your active theme functions.php file:

function my_custom_email_html_tags( $allowed_html ){
if( $allowed_post_html = wp_kses_allowed_html( 'post' ) ){
$allowed_html = $allowed_post_html;
}
return $allowed_html;
}
add_filter( 'wpforo_kses_allowed_html_email', 'my_custom_email_html_tags');

How to Easily Add Custom Code in WordPress (without Breaking Your Site)

Posts: 5
Topic starter
(@steffeng)
Active Member
Joined: 3 years ago

perfect...thanks 🍾