[Bug] Lost spaces in summary (#Plot) after words with length 4 and less (1 Viewer)

arion_p

Retired Team Member
  • Premium Supporter
  • February 7, 2007
    3,373
    1,626
    Athens
    Home Country
    Greece Greece
    Just a note:   html entity is a non-breaking space, so is 0xA0 character code in Unicode. So technically this (HtmlDecode) is working as expected. We need to make sure all non-breaking spaces are converted to regular spaces before importing to DB
     

    ShIvADeSt

    Portal Pro
    May 30, 2009
    71
    2
    So may be rename topic in "Lost spaces in Summary (#Plot) if it is non-break space"? Or "Convert non-break spaces into regular spaces"
     

    Seidelin

    Retired Team Member
  • Premium Supporter
  • August 14, 2006
    1,755
    652
    Kgs. Lyngby
    Home Country
    Denmark Denmark
    Just a note:   html entity is a non-breaking space, so is 0xA0 character code in Unicode. So technically this (HtmlDecode) is working as expected. We need to make sure all non-breaking spaces are converted to regular spaces before importing to DB

    Should we add this to mantis then?
     

    arion_p

    Retired Team Member
  • Premium Supporter
  • February 7, 2007
    3,373
    1,626
    Athens
    Home Country
    Greece Greece
    I would say yes. Though I am not yet sure of the proper solution.
     

    Deda

    Lead Dev MP1 Videos
  • Premium Supporter
  • March 18, 2009
    2,423
    2,385
    Zagreb
    Home Country
    Croatia Croatia
    Yes I have it for a long time but can't verify it on kinopoisk examples because it changed HTML code to   which HTMLDecode correctly change to a space so I can't verify patch (I tested on only on user database and patch corrects those 0xA0).
     

    Attachments

    • vdbCleanString.patch
      1.8 KB

    elliottmc

    Retired Team Member
  • Premium Supporter
  • August 7, 2005
    14,927
    6,061
    Cardiff, UK
    Home Country
    United Kingdom United Kingdom
    Yes I have it for a long time but can't verify it on kinopoisk examples because it changed HTML code to   which HTMLDecode correctly change to a space so I can't verify patch (I tested on only on user database and patch corrects those 0xA0).

    Is there any chance of regression for anyone else? What is your general feeling on this? Should the fix be committed?

    Thanks,

    Mark
     

    Deda

    Lead Dev MP1 Videos
  • Premium Supporter
  • March 18, 2009
    2,423
    2,385
    Zagreb
    Home Country
    Croatia Croatia
    Patch itself is harmless so it will do a transform for problematic non-breaking space and some XML special chars or string will just pass the code and nothing happens. Maybe it will be a good for the future to place html cleaning there so if something slips script, here will be converted to a normal char but it would need little attention because music plugin also uses this for converting strings with single quotas to a string suitable for sql lite database.
     

    Users who are viewing this thread

    Top Bottom