Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter iokagr

    (@iokagr)

    Hey,

    no, that’s not what I want. What I really want is that my HTML won’t become escaped in emails. I want to be able to customize my templates with different HTML content.

    Right now, when I enter HTML in a template, the plugin escapes HTML tags in emails so that they appear as normal next. This might be either a bug. Or, a security feature that the customer didn’t request since she’s the one who enters HTML in emails. Twig’s autounescape feature doesn’t work either.

    What confuses me more is that the plugin sets the content-type of emails in the header correctly to text/html but it escapes HTML content… that’s why I mentioned bug.

    So, I found a way to solve that issue for me (didn’t want to analyse the whole code to find out where to disable autoescspe for HTML). At the end, I insert a placeholder in my template wherever I want my HTML content to be placed, let’s say %html_booking% in booking. And this placeholder is replaced right before the email is sent with my actual HTML content (see above code). Since content is replaced right before the email is sent via WP’s mail function, my HTML content won’t become escaped anymore.

    Best regards

    Thread Starter iokagr

    (@iokagr)

    Hello Natalie,

    appreciate your quick response!

    ​We have some customers who use the Email Templates plugin:
    https://wordpress.org/plugins/email-templates/

    I believe it’s compatible with our notification system (it should affect any email sent via WordPress). It has options to add your logo, colors, and other styling options.

    Yes, this plugin is useful for styling your e-mails in general. However, it does not provide custom placeholders that I can use in my different appointment templates. In my case, I want to add different links into my booking/canceling e-mails.

    I think, the most trivial (but worst) solution I can use so far is to modify the ssa_wp_mail function inside includes/class-notifications.php. In my booking template, I may have a placeholder like %magic_booking_link%. Then, to render it, I modify the function as follows:

    
    ...
    add_filter( 'wp_mail_from_name', array( $this, 'get_ssa_from_name' ) );
    		
    $message = str_replace("%magic_booking_link%", "This is my <a href='magic.com'>magic</a> link", $message);
    
    wp_mail( $to, $subject, $message, $headers, $attachments );
    remove_filter( 'wp_mail_from_name', array( $this, 'get_ssa_from_name' ) );
    ...
    

    Hope HTML will be supported in future releases.

    Best regards

    Thread Starter iokagr

    (@iokagr)

    Hey there,

    can you explain to me what you mean by “unfortunately, your Lightbox does not work properly”? For me it works as it should…maybe I missed something.

    I sent an email to your support and explained my modifications to them.
    Hope this helps you 🙂

    Best regards

    Thread Starter iokagr

    (@iokagr)

    Hey Ed,
    no, I dont use WooComerce.
    There may be a conflict with another Plugin. However, I think the problem occurs because there are 2 selection boxes.
    I inspected the generated HTML code and I saw the following (altered and in greek):

    <div id="tribe-bar-views" class="">
        <div class="tribe-bar-views-inner tribe-clearfix">
            <h3 class="tribe-events-visuallyhidden">Εκδήλωση Views Navigation</h3>
            <label>Προβολή ως</label>
    	
    <!-- First Box -->
    
            <select class="tribe-bar-views-select tribe-no-param" name="tribe-bar-view" aria-label="View Εκδηλώσεις As">
    		<option tribe-inactive="" value="https://xeniteas-duesseldorf.de/events/list/" data-view="list">
    								Λίστα							</option>
    													<option selected="" value="https://xeniteas-duesseldorf.de/events/month/" data-view="month">
    								Μήνας							</option>
    													<option tribe-inactive="" value="https://xeniteas-duesseldorf.de/events/today/" data-view="day">
    								Ημέρα							</option>
    	
    </select>
    
    <!-- Here is the second box -->
            <ul class="tribe-bar-views-list">
                <li class="tribe-bar-views-option tribe-bar-views-option-month tribe-bar-active" data-tribe-bar-order="1" data-view="month"> <a href="#">   <span class="tribe-icon-month">
    								Μήνας							</span></a></li>
                <li class="tribe-bar-views-option tribe-bar-views-option-list" data-tribe-bar-order="0" data-view="list"> <a href="#">   <span class="tribe-icon-list">
    								Λίστα							</span></a></li>
                <li class="tribe-bar-views-option tribe-bar-views-option-day" data-tribe-bar-order="2" data-view="day"> <a href="#">   <span class="tribe-icon-day">
    								Ημέρα							</span></a></li>
            </ul>
        </div>
    </div>

    The select tag contains the first menu which has the the old-fashioned style.
    The ul tag contains the list that is supposed to be used with the tribe style.
    And what I did it simple: to hide the select tag….

    Hope this helps you 🙂
    Best regards

    Thread Starter iokagr

    (@iokagr)

    Hi, sure.

    https://xeniteas-duesseldorf.de/bildergalerie/

    The site already contains the changes.

    Thread Starter iokagr

    (@iokagr)

    Unfortunately we cannot predict how it will behave for different themes.

    True. My current theme is “Sparkling”. I tested some popular themes and the language menu was displayed “above/in front” of the header cause of the z-index.

    There might be an option to automatically turn on/off z-index to help especially unexperienced users fix this issue if necessary.

    Thread Starter iokagr

    (@iokagr)

    Hey,

    The original has a different background as a hint.

    D’oh! Didnt notice it. Thought it was the currently active language. However, I added “(Original)” behind the source language. Now it should be more clear.

    1./2.) My bad! Seems like there was a conflict with another plugin or settings. My original website was translated to the source language (from el to el) and there were some strange outputs… 😛 It’s working now.

    Thanks for replying!

Viewing 7 replies - 1 through 7 (of 7 total)