Editing Event Descriptions Shows HTML

Home Forums Calendar Products Community Events Editing Event Descriptions Shows HTML

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #70757
    Jonathan Goldford
    Participant

    Hi,

    We recently turned off the visual editor for adding new events and editing events. It looks like once you create a description, then try to edit it, HTML is shown. For example, if the original description is:

    “This is a test.”

    Then upon editing the description will say:

    “This is a test.”

    Since the community doesn’t know HTML is there any way to avoid them seeing HTML?

    Thanks a ton.

    Jonathan

    #70758
    Jonathan Goldford
    Participant

    Sorry, but it looks like when I submitted the request the HTML was actually used in my post. When editing the description will look like:

    “This is a test.”

    Thanks.

    Jonathan

    #70759
    Jonathan Goldford
    Participant

    Haha. It looks like it happened again even with spaces in the HTML. There should be p tags just outside “This” and “test.”.

    Thanks.

    #70842
    Casey
    Participant

    Jonathan,
    Yes, that’s because when those events were initially created using the visual editor, the description was saved as HTML. If you continue to use the non-Visual editor for adding/editing events, then I would suggest editing out the HTML for existing events. You should only have to do this for events that were submitted with the Visual Editor, since no HTML will be submitted using the non-visual editor.

    I hope that helps to answer your question. Thanks!

    #71175
    Jonathan Goldford
    Participant

    Got it. Thanks a lot Casey. Is there an easy way to remove the HTML if we have hundreds of events that used the visual editor? I assume we could use some kind of PHP script, but I’d rather not take the risk with the database if possible.

    Thanks a lot.

    Jonathan

    #71184
    Casey
    Participant

    Jonathan,
    The only way to do something like this would be to edit the plugin files, which I don’t recommend. If you only wanted to display plain text when editing an event that has an HTML description, you could change line 2109 of ‘lib/tribe-community-events.class.php’ to something like this:


    echo strip_tags($post_content);

    This would basically strip out all HTML tags before displaying them in the textarea field.

    Keep in mind that these changes will be lost when you update the plugin, so consider that your warning. 😉

    Good luck!

    #71189
    Jonathan Goldford
    Participant

    Got it Casey. Thanks a lot for the quick responses. I’ll talk with our client and we’ll move forward. Feel free to mark closed.

    #71191
    Casey
    Participant

    Great! Glad to help! Feel free to start another thread if you have further questions.

    #981437
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Editing Event Descriptions Shows HTML’ is closed to new replies.