New line chars removed?
It seems that on a default install of ReviewPost (using the IP2 forum userbase) the new line character is removed from review submissions in the comment area.
Can someone point me towards the right area of code ot look at to remove this?
Users should be able to enter multiple paragrahs in reviews, however this is disabled in the current system.
HMM You can try removing this from reviews.php
$message = trim($message);
Are there any other special characters that that trim command removes? As in, does it only remove newline chars, or will it's removal leave submissions open to XSS (cross site script) style attacks?
removes dead space and a few other things
Thanks, now the tabs and extra spaces/return chars are stored, however the characters are simply dumped into HTML as newline and spaces, rather than coded into the appropriate %nbsp and <br/> tags.
Where abouts int he code is the best place to add routines that parse the text correclty for the display routine?
ive been meaning to sort this as well
Arnies right about that - removing that string just puts in a lot of html spacing code
im a little confused as to why this hasnt been looked it before. Surely paragraphs and breaks need to remain in order for the article to be easily read
whats the best solution to this?
Stick $message = trim($message); back into reviews.php as that strips whitespace from the beginning and end of a string; no need to keep that space around. What you want to do instead is modify the convert_returns function in the pp-inc.php file from:
thanks for that frost
though that doesnt seem to change anything - its just the same as the default installation, paragraphs etc still dont work
has anyone resolved this issue as yet
Not that I'm aware of, I've not had a great deal that's been of use mentioned to me. Personally my feeling is that a lot of the integration with other forums is sadly somewhat lacking.
Bug now fixed:
I posted the code that was at fault and the code changes needed. There's no word if the fix will be incorporated in the next release, but there you go.
|All times are GMT -5. The time now is 09:14 PM.|
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0