Truncating strings

Report issues with Enuuk Auction Platform or Mods here - remember to raise a ticket with as well
Post Reply
Posts: 220
Joined: Mon Feb 06, 2012 12:05 pm

Truncating strings

Post by bamse » Wed Mar 19, 2014 10:07 pm

Not sure whether this is an issue in newer versions of phpauction.

Following is for my ancient v 2.11

In several places (e.g. in userProfile.php), strings are truncated in output using just

Code: Select all

This can create at least two problems:

1. strange characters can appear in UTF-8 encoded strings
2. if $string contains html-tags truncating in this way can create invalid html (e.g. by removing the closing tag or by cutting inside a tag

The first problem could be fixed using mb_substr($string,"UTF-8") instead of substr($string)

For the second problem one could strip_tags() the string or use a function like the following to preserve tags: ... ags-words/

Site Admin
Posts: 750
Joined: Fri Jan 08, 2010 2:23 am
Location: Stoke-on-Trent

Re: Truncating strings

Post by RWAP » Thu Mar 20, 2014 10:06 am

Yes - this looks to have been rectified in v3.0 onwards where they use:

Code: Select all

for example

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests