FS#5128 - Comments aren't being submitted in full

Attached to Project: AUR web interface
Opened by Joshua Taylor (deficite) - Friday, 28 July 2006, 16:08 GMT
Last edited by Roman Kyrylych (Romashka) - Thursday, 04 October 2007, 17:17 GMT
Task Type Bug Report
Category Backend
Status Closed
Assigned To No-one
Architecture All
Severity Medium
Priority Normal
Reported Version 1.2.9
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

I keep on having problems with posting comments in AUR. It chops off most of the comment and only leaves like the first sentence or so of the comment. I'm not getting any error messages or anything, so I don't know what the problem is.
This task depends upon

Closed by  Roman Kyrylych (Romashka)
Thursday, 04 October 2007, 17:17 GMT
Reason for closing:  Fixed
Comment by Joshua Taylor (deficite) - Friday, 28 July 2006, 16:13 GMT
It has to do with the <'s. There's already a bug report about this.
Comment by tardo (tardo) - Tuesday, 28 August 2007, 20:52 GMT
here's the offending code.
print str_replace("\n", "<br>", str_replace('"',"&quot;", htmlspecialchars(strip_tags(stripslashes($carr["Comments"])))));
Comment by tardo (tardo) - Tuesday, 28 August 2007, 21:11 GMT
print str_replace("\n", "<br>", str_replace('"',"&quot;", htmlspecialchars(stripslashes($carr["Comments"]))));

This fixes it temporarily.. however this is more of a security issue. Why not addslashes when comments are entered into the db then strip them when reading them?

Loading...