Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Obscure Formating errors CLEditor

2

Comments

  • edited January 2014

    ok lets see this , you have another index.php happening here

    <html><script type="text/javascript">window["_gaUserPrefs"] = { ioo : function() { return true; } }</script><head><link rel="stylesheet" type="text/css" href="/CaBaFoRuM/plugins/cleditor/design/cleditor.css"><meta http-equiv="X-UA-Compatible" content="IE=edge"><style type="text/css"></style></head><body style="margin:4px; font:10pt Arial,Verdana; cursor:text"></body></html>

    Look at a web inspector and the resources, there should only be one index.php on that list .
    The iframe for cleditor is html not php

    And should not appear in that list, have you tried using rewrite url true ?

  • Dr_SommerDr_Sommer ✭✭
    edited January 2014

    @ Peregrine:
    The DB saves the data as this:

    test&nbsp; lower&nbsp; case<br>

    Should be:

    test lower case (double spaces between)

    not shure if that is correct

    p.s.: If I turn CLEditor off, everything is fine (but with the lack of WYSIWYG)!!!

    @Vrijvlinder: ok, that seems to be the same Index problem, as I had with your TinyMCEFour Plugin... ;)
    I'll try again to find this double Index....

  • peregrineperegrine MVP
    edited January 2014

    perhaps

    change jquery.cleditor.min.js and

    you change line 847 in jquery.cleditor.js and add the meta there.

    and if you use the min (which you do if debug is not on).

    ((options.docCSSFile === '') ? '' : '<head><link rel="stylesheet" type="text/css" href="' + options.docCSSFile + '" /></head>')
    
    to
    
     ((options.docCSSFile === '') ? '' : '<head><meta charset="utf-8"><link rel="stylesheet" type="text/css" href="' + options.docCSSFile + '" /></head>')
    

    you would need to change jquery.cleditor.min.js - I can't give you a line number but search for
    options.docCSSFile to find location.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • changed it, restarted the plugin , tested with clean Firefox, same issue... ;(
    this is really driving me nuts... ;););)

  • peregrineperegrine MVP
    edited January 2014

    see attachment below

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • @Dr_Sommer said:
    changed it, restarted the plugin , tested with clean Firefox, same issue... ;(
    this is really driving me nuts... ;););)

    the min file?

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • i changed both, jquery.cleditor.js and used your file = jquery.cleditor.min.js
    no luck...
    I'll now download CLEditor again, and make a clean Install with your Changes...

  • peregrineperegrine MVP
    edited January 2014

    also change

      docType:      // Document type contained within the editor
                        '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">',
    
    to
    
     docType:      // Document type contained within the editor
                        ' <!DOCTYPE html>',
    

    in the top of the js.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • here's a change with the doctype.

    here is a zip for the min with change.

    you can save the old one to a different name.

    and extract this in

    plugins/cleditor/js

    and see if it works.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Dr_SommerDr_Sommer ✭✭
    edited January 2014

    no luck... changed everything in both files....
    p.s.: also changed min.js with your file... nothing... ;(
    I have a queasy conscience holding you up with this... ;)
    But also I'm stunned, that nobody else has this issue... :O

  • edited January 2014

    I have a theory, the saved posts are using charset=ISO-8859-1

    Try using that instead of utf 8 see what happens. But here is abetter link for info on the matter

    http://www.bluetwanger.de/blog/2006/11/20/mysql-and-utf-8-no-more-question-marks/

  • peregrineperegrine MVP
    edited January 2014

    just for grins in the js

    change:

    '<html><head>' +
          ((options.docCSSFile === '') ? '' : '<head><link rel="stylesheet" type="text/css" href="' + options.docCSSFile + '" /></head>') +
          '<meta http-equiv="X-UA-Compatible" content="IE=edge" />' + 
          '</head>' + 
          '<body style="' + options.bodyStyle + '"></body></html>'
    
    
    to 
    
    
    '<html><head> <meta charset="utf-8"> </head><body style="' + options.bodyStyle + '"></body></html>'
    

    also to make testing easier in default.php

    change
        $Sender->AddJsFile('jquery.cleditor'.(Debug() ? '' : '.min').'.js', 'plugins/cleditor', $Options);
    
        to
    
        $Sender->AddJsFile('jquery.cleditor.js', 'plugins/cleditor', $Options);
    

    then you can make test changes in 'jquery.cleditor.js' it will be easier to edit the js and view changes.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • changed it, peregrine, still no luck...
    But now I now where to search, if You think that has t be an UTF8/ DocType error....
    I'll take all day after the weekend to try some nasty things out... ;)))

  • I think this has to do with mysql , you need to execute this query at the beginning of the session.

    mysql_query(’SET CHARACTER SET utf8;’);

    I wonder what his collate tables say ? That would be a dead giveaway ...he has not said if he looked in the database to see ...

  • ok, will switch to the jquery.cleditor.js

  • Please look at this link , I am starting to think this has to do with mysql, after all everything was working before right ?

    http://www.bluetwanger.de/blog/2006/11/20/mysql-and-utf-8-no-more-question-marks/

  • peregrineperegrine MVP
    edited January 2014

    @vrijvlinder said:
    I think this has to do with mysql , you need to execute this query at the beginning of the session.

    mysql_query(’SET CHARACTER SET utf8;’);

    I wonder what his collate tables say ? That would be a dead giveaway ...he has not said if he looked in the database to see ...

    why would it be mysql - if it works in other editors on his site with meta for utf-8 in header with the same database? just curious why?

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • hmm... the Collation of each table says "utf8_unicode_ci"
    in Summary it says "MyISAM utf8_general_ci"

  • @vrijvlinder said:

    I wonder what his collate tables say ? That would be a dead giveaway ...he has not said if he looked in the database to see ...

    where can I retrieve this?

  • edited January 2014

    If the posts are saved in something else other than utf-8 for some reason and the doc type says it's utf-8 but the content is not the browser returns question marks.

    You can technically reproduce the issue by changing the encoding in your browser to something else.

    The results are the same between mysql connection and the browser. The server says something other than unicode is stored here , the browser says I want utf8 , the result is ? wtf ?

Sign In or Register to comment.