#125 calendar plugin messes up event_text

closed-fixed
nobody
None
5
2006-05-06
2005-09-14
joxy-be
No

Hi,

When:
* a user enters a new event in the calendar plugin,
and there is a newline in the entered text in the
event_text textarea.

What:
* the plugins changes this text string with 'nl2br', an
removes newline and carriage return to store it internally.

Problem:
* Day view of the calender shows html code to user
because it uses 'htmlspecialchars' on the string
* The Edit window shows html code because it does not
translate <br /> back into a newline char
* the "onmouse-over" thingy (how does one call such a
beast ?) shows also the html code to the user in the
month view.

Discussion

  • Logged In: YES
    user_id=620333

    This is interesting... Looking at the code, it does a nl2br,
    then the next two lines replace \n and \r with nothing,
    which would be redundant. At least the \n would already be
    stripped out.

    I'll take a look, and see if we can switch the order around
    to fix the problem.

     
  • Tomas Kuliavas
    Tomas Kuliavas
    2006-01-08

    • assigned_to: nobody --> tokul
     
  • Tomas Kuliavas
    Tomas Kuliavas
    2006-01-08

    Logged In: YES
    user_id=225877

    \n\r replaces are needed because nl2br() does not remove
    linefeeds. calendar plugin stores are in one line and
    linefeeds break things in used data storage backed.

    Theoretically sanitising should be done in calendar_data.php
    writecalendardata() function and not in calendardata()
    creation code.

     
  • Tomas Kuliavas
    Tomas Kuliavas
    2006-01-14

    • labels: 477103 -->
     
  • Tomas Kuliavas
    Tomas Kuliavas
    2006-01-14

    Logged In: YES
    user_id=225877

    Issue should be fixed in 1.5.1cvs. Please make sure that you
    can reproduce your issue in latest devel version of plugin.

     
  • Tomas Kuliavas
    Tomas Kuliavas
    2006-02-19

    • assigned_to: tokul --> nobody
     
  • Tomas Kuliavas
    Tomas Kuliavas
    2006-05-06

    • status: open --> closed-fixed
     
  • Tomas Kuliavas
    Tomas Kuliavas
    2006-05-06

    Logged In: YES
    user_id=225877

    Fixed in 1.4.7cvs. If you still have issues with calendar
    plugin - file other bug report.