Strange bug with the "<" less than character

QuestionsStrange bug with the "<" less than character
Sunny Kim asked 7 months ago

I just discovered a very strange bug.  If I have a “<” (less-than) character followed by any non-white character, then the grid ignores everything after and including the “<” character.  For example,  let’s say my text is “Hello world <1 blah blah”.   Then the grid will only insert “Hello world ” into the database.

My column is defined as:

$col = array();
$col["title"] = "Notes";
$col["name"] = "Notes";
$col["dbname"] = 's.Notes';
$col["editable"] = true;
$col["editable"] = true;
$col["edittype"] = "textarea";
$col["width"] = "400px";
$col["editoptions"] = array("rows"=>"25", "cols"=>"100",);
$col["visible"] = "sm+";
$cols[] = $col;

Has this been reported before?
Sunny Kim replied 7 months ago

Btw, the “Notes” column is declared as “longtext” in the db.

Sunny Kim replied 7 months ago

Oh…. I think I see the probleem here. It looks lke gridphp is treating “<3" as an html tag (although it was meant to be less-than 3").

Setting $col[“sanitize”] = false; appears to fix this issue.

1 Answers
Abu answered 7 months ago

Yes, this is it.

Thanks for the update.

Sunny Kim replied 7 months ago

I do think the html tag identification logic can be improved though. 😉 Thanks!

Your Answer

8 + 1 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?