Fork me on GitHub

Zclassifieds escape quotes in random block - help please  Bottom

  • Using Zclassifieds 2.2.

    When someone posts an ad, with some text in quotes, e.g. "Weim Flies",

    well this appears as intended in the main ad display, but in the random ad bock it would appear as follows:

    \"Weim Flies\"

    Any suggestions thanks.

    You can see this at http://www.weimaranerworld.co.uk

    refresh several times and the particular ad will surface.

    Thanks.
  • There needs to be a code update to fix this. There is a function called (somehting like) pnVarPrepForDisplay() that is supposed to get rid of things like this. I'm not intimately familiar with this function, or this module, but somehting like this is probably what's needed in the display code.

    Frank
  • Thanks for the hint. Have now sorted it.

    Entered the following code at the relevant points in the zc_random.php file



    Code

    $row['subject'] = pnVarPrepForDisplay($row['subject']);
            $row['subject'] = stripslashes($row['subject']);


    Code

    $row['descript'] = pnVarPrepForDisplay($row['descript']);
            $row['descript'] = stripslashes($row['descript']);

This list is based on users active over the last 60 minutes.