Java entities lose starting backslash when displayed or edited

Issue #114 resolved
Former user created an issue

Originally reported on Google Code with ID 114

Unicode Characters kept as Java entities like \uXXXX lose backslash at the beginning
when displayed or edited. Bad thing actually: makes the script useless unless you're
going o empty or drop some table.

Reported by shimanskybiz on 2012-08-03 20:11:53

Comments (6)

  1. Christopher Kramer
    Thanks for reporting this issue and sorry that you got no reply yet.
    
    I guess this problem is caused by the formatString() method which has been introduced
    quite early in version 1.2. It runs stripslashes() on the values, but I cannot see
    any reason for this. I'll have a closer look at this, but I guess we might drop the
    whole formatString() method and instead use the htmlencode()-function I introduced
    lately. It does more or less the same thing, with these differences:
    - does not run stripslashes() ;-)
    - sets encoding to UTF-8 so the strings are handled properly (at the moment phpliteadmin
    is UTF-8 only)
    - uses htmlentities() instead of htmlspecialchars(). This will replace some more characters.
    - properly encodes quotes (which is quite important at some places) 
    

    Reported by crazy4chrissi on 2012-10-23 21:09:41

  2. Christopher Kramer
    Issue 127 has been merged into this issue.
    

    Reported by crazy4chrissi on 2012-11-01 11:50:33

  3. Christopher Kramer
    This issue was closed by revision r251.
    

    Reported by crazy4chrissi on 2012-11-02 17:20:43 - Status changed: Fixed

  4. Christopher Kramer
    Just fixed this issue in SVN. As planned, I dropped formatString() completely and used
    htmlencode() everywhere instead.
    
    You can get the latest version from SVN here:
    http://phpliteadmin.googlecode.com/svn/source/1.9.3/phpliteadmin.php
    

    Reported by crazy4chrissi on 2012-11-02 17:28:13

  5. Log in to comment