Editing Default Text to Display before calendar

Home Forums Calendar Products Events Calendar PRO Editing Default Text to Display before calendar

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #971589
    Home Napier
    Participant

    Hi

    While editing this text in the Display Settings “Add HTML before event content”

    1) The Visual / Text editor strips out valid HTML like the following every time I save it.

    <a class="btn mgt-button mgt-style-red mgt-size-normal mgt-align-left mgt-display-inline mgt-text-size-normal mgt-text-transform-none" style="margin-top: 5px;" href="mailto:[email protected]?Subject=Event" target="_self"><i class="fa fa-envelope"></i> Tell the Siebel Hub about your Event</a>

    #971619
    George
    Participant

    Hi Richard,

    Sorry you’re having trouble with this! This is unfortunately the result of some security-related code we have that, as you describes, strips and/or escapes HTML of various types before communicating it to/from the database.

    Even if HTML is “valid”, it might still get stripped, so the best alternative I can recommend is to just use a filter to achieve the same result – you should fortunately be able to do this quite simply, by using the tribe_events_before_html filter in your theme’s functions.php file.

    To see an example of this, I’ve made a Gist for you that you should check out here → http://git.io/vLXlK

    If you copy and paste that code into your theme’s functions.php file, it should help here.

    Let us know if it does! Or if you have any other questions or concerns 🙂

    Thanks,
    George

    #971680
    Home Napier
    Participant

    GEORGE

    Many thanks, this solved the issue and taught me something. Bonus

    Many thanks

    R

    #971859
    George
    Participant

    Awesome! Glad to hear about both results 🙂

    Be sure to keep a good backup of your site so that you help prevent the loss of custom code like this.

    Best of luck with your site,
    George

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Editing Default Text to Display before calendar’ is closed to new replies.