Results 1 to 6 of 6

Thread: htmleditor adding characters

  1. #1
    Sencha User frrogoy's Avatar
    Join Date
    Jan 2010
    Location
    Central Indiana
    Posts
    89

    Default htmleditor adding characters

    The form htmleditor adds an html br after the text. I can live with that. But sometimes I'm getting a funny character that is causing me a problem.

    Now I'm adding a second note.​

    I'll also attach a picture in case the above doesn't display.
    Using FF and Ext3.1. The funny chars appear in the database (MySQL).
    In the picture you can see it got added in the middle of the line in one case.
    Attached Images Attached Images
    Frank R.

  2. #2
    Sencha User
    Join Date
    Sep 2009
    Posts
    25

    Default

    Is there a solution to this problem?

  3. #3

    Default

    Submitted bug: http://www.sencha.com/forum/showthre...cters&p=575311

    Did you ever find a work-around or solution?

  4. #4
    Sencha User frrogoy's Avatar
    Join Date
    Jan 2010
    Location
    Central Indiana
    Posts
    89

    Default Funny Characters

    Never got a total solutions. The problem is worst if I have to email something that was formerly entered via the htmleditor.
    I'm avoiding them and just using textareas now, unless the customer insists.
    I use the following calls before putting the text in emails. It gets most of it out.
    PHP Code:
    $mailer->Body .= strip_tags(decode_entities($n['note']));
    function 
    decode_entities($text) {
        
    $texthtml_entity_decode($text,ENT_QUOTES,"ISO-8859-1"); #NOTE: UTF-8 does not work!
        
    $textpreg_replace('/&#(\d+);/me',"chr(\\1)",$text); #decimal notation
        
    $textpreg_replace('/&#x([a-f0-9]+);/mei',"chr(0x\\1)",$text);  #hex notation
        
    return $text;

    Last edited by frrogoy; 28 Feb 2011 at 10:51 AM. Reason: fix php
    Frank R.

  5. #5

    Default

    The reply in the bug thread worked for me. Give it a try.

  6. #6
    Sencha User frrogoy's Avatar
    Join Date
    Jan 2010
    Location
    Central Indiana
    Posts
    89

    Default Patch

    Thanks. I'll try it. I assume it goes in the js module where the htmleditor is used...
    Frank R.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •