• On the calendar I had included <br> tags to make the different waterpark items show up on separate lines. After I updated the site to PHP 7.2 and WordPress 5.0 the <BR> tags are showing up. I was able to remove the <br> tags through the database, but now the Hours section is showing up as an extra link. When you add a blank line the calendar creates an empty paragraph and then adds the hours in a new paragraph & link. Is there a way to fix this?

    $29 Full Day Pass <BR>
    No Evening Passes <BR>
    $10 Spectator Pass <BR>
    <BR>
    Hours: 9:00am - 10:00pm

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Kieran O’Shea

    (@kieranoshea)

    I have found the issue here and will fix it in the next release. In the meantime, modify the calendar plugin code in calendar.php and replace this
    $desc = !empty($_REQUEST['event_desc']) ? wp_filter_nohtml_kses($_REQUEST['event_desc']) : '';
    with
    $desc = !empty($_REQUEST['event_desc']) ? wp_kses_post($_REQUEST['event_desc']) : '';
    you should find two instances. Also find this
    htmlspecialchars(stripslashes($event->event_desc))
    and replace with this
    stripslashes($event->event_desc)
    there will be one instance of this

    After you’ve done this, any new events you save or events you edit with BR tags will get saved/displayed correctly

    Thread Starter SketchyTK

    (@sketchytk)

    Thank you, Kieran.

    That fixed the break tag issue. I have a second issue: if I add 2 <br> tags in a row the following content ends up as a link. See January 1-5 for examples.

    Plugin Author Kieran O’Shea

    (@kieranoshea)

    From what I can see, the only way to re-create that issue is if you’ve actually pasted a link into your event description in some way, perhaps accidentally by copying another event. Go into the affected event, in the text box do Ctrl-a and hit delete, then re-type the content, using only <br /> tags – you should find it renders correctly

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

The topic ‘Event Description Line Breaks’ is closed to new replies.