Characters in title and description

Discussion in 'Technical Support' started by chippie, Dec 4, 2011.

  1. chippie Customer

    I have noticed that when someone uses commas in the ad title I do not get a proper url.

    2000-okamoto-acc-32-80dxnc-surface-grinder,-horizontal-spindle.html

    Also; if I have the < less than sign in the description it cuts off the rest of the description after I save it.

    For example: Power Output: <1 milliwatt everything after the < is not saved.

    Is there a way that I can allow the comma in the description but strip it out when in creates the url and also allow the less than sign in the description?

    Thanks

    Chippie


    V4.2.3 Developer

    Sigma Navy

    www.MachineryClassifieds.com
  2. Mike-N-Tosh Developer & Moderator

    These are two completely separate items.

    URI's (URL's) do not allow the use of a comma in them. This is one of several characters with special meanings assigned to them within a URI that would be interpreted to do something different as in a scheme.

    As far as the description goes, that may be caused by the "html allowed" settings. You might try putting just the "<" (without the quotes) in your html allowed entities, but I don't know if that will work or not. Otherwise, you may need to use the HTML equivalent "<".

    On a side note, I noticed that your page nav table for pagination is too small, therefore when you do a search for all of your listings, the pagination display is messed up.
  3. chippie Customer

    Is there a way of automatically stripping disallowed characters out of the title? A user would not know why the link is not working after they posted the ad.



    I was able to add the < into the allowed entities and use the same in the description and that worked until I can figure a workaround.

    I fixed the pagination display. It was 200px wide so I changed it to 300. Thanks for the heads up on that.

    Regards

    Chippie
  4. John Snyder Staff

    By any chance did I work on your seo module before? If I'm not mistaken I had to modify it. If this is the case submit a support ticket I'll get you sorted out.

    As for the < and > Its difficult to catch because if you were to allow HTML and these are not encoded, it will be interpreted as HTML and if you don't close them it will strip out the content following < until it reaches >.

    Your only choice is to have them use "Less than" or < or use a more powerful HTML processor that cleans up invalid HTML and removes invalid/not allowed HTML.

    You can modify includes/classes/kernel/Filter.php to use something like HTMLPurifier to get finer control over whats allowed and what isn't, as well as cleaner HTML. I plan on including it or at least have some built in support for it in the next release.

    I have done this already, but its configuration still needs a bit of work, and until that's finished you'd have to make the custom definitions of what is allowed/not allowed via a core file. If you are interested let me know.

Share This Page