edit answer: newline turned into <br />
Brought to you by:
jholmes763
1.When editting a survey, add a question with a newline
in the Question Text, e.g.:
---
What do you think
about blue pigs?
---
2.Save the question.
3.Edit the question (click the Edit button) - the text
shown includes the newline and a new <br />:
---
What do you think<br />
about blue pigs?
---
4.Repeate save/edit to get more <br />s.
uccass: 1.8.2 (cvs)
Expected behaviour: The <br /> shouldn't appear.
Likely cause: nl2br is called unnecessarily
Note: survey_text_mode = 2, user_text_mode = 2
Logged In: YES
user_id=609197
Jakub,
I have a fix for this in my CVS which I should upload today.
It involves making another SAFE_STRING version,
SAFE_STRING_TEXTAREA, that'll be used for text that needs to
be displayed in a textarea. There's only two places where
it'll be needed, iirc. The code uses SAFE_STRING_TEXT now,
which includes the nl2br() call.
---John Holmes...