PhotoPost Community

PhotoPost Community (http://www.photopost.com/forum/)
-   ReviewPost Bug Reports (http://www.photopost.com/forum/reviewpost-bug-reports/)
-   -   New line chars removed? (http://www.photopost.com/forum/reviewpost-bug-reports/114496-new-line-chars-removed.html)

Arnie June 18th, 2005 11:43 AM

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.

Chuck S June 18th, 2005 03:38 PM

HMM You can try removing this from reviews.php

$message = trim($message);

Arnie June 18th, 2005 07:40 PM

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?

Chuck S June 18th, 2005 07:46 PM

http://us2.php.net/manual/en/function.trim.php

removes dead space and a few other things

Arnie June 18th, 2005 08:01 PM

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?

fonzerelli_79 June 23rd, 2005 11:58 PM

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?

Frost June 24th, 2005 01:04 AM

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:
Code:

Content visible to verified customers only.
To something like the following:
Code:

Content visible to verified customers only.

fonzerelli_79 June 28th, 2005 11:09 AM

thanks for that frost
though that doesnt seem to change anything - its just the same as the default installation, paragraphs etc still dont work

fonzerelli_79 June 30th, 2005 10:12 AM

has anyone resolved this issue as yet

Arnie June 30th, 2005 10:35 AM

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.

Arnie July 13th, 2005 02:18 AM

Bug now fixed:
http://www.photopost.com/members/for...wpost&t=114639

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


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97