Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter zeguigui

    (@zeguigui)

    deckbox.org is https compatible so you can enable SSL on changing:
    wp_enqueue_script('deckbox', 'https://deckbox.org/javascripts/tooltip.js');

    to:
    wp_enqueue_script('deckbox', set_url_scheme('https://deckbox.org/javascripts/tooltip.js'));

    (line 88)

    same problem. Plugin does not load french translation

    Same issue but if you look at the code no extra space is added. In fact this is a font issue.

    You need to change editor-style.css for h1,h2…h6

    Default is “Hiragino Sans GB”, “Droid Sans Fallback”, “Microsoft YaHei” but you probably have none of those fonts

    zeguigui

    (@zeguigui)

    This code solves the UTF8/ISO-Latin-1 problem but there is still a problem. email RFC request that subject and sender to be in 7 bit ascii!

    You will need to Q-Encode or B-Encode the subject and sender to be fully compliant with this RFC.

    Being “RFC compliant” is a plus with some antispam softwares.

    Here is a sample function to Q-Encode a string:

    function encodeMailHeader($txt)
    {
    $result = "";
    // Search for an 8 bit char in supplyed string
    $len = strlen ($txt);
    $bNeedEncoding = false;
    for ($i = 0; $i < $len; $i++)
    {
    if (ord(substr($txt, $i, 1)) > 127)
    { // On est sur 8 bits !
    $bNeedEncoding = true;
    break;
    }
    }
    if ($bNeedEncoding)
    {
    $result = '=?iso-8859-1?Q?'; // Q encoding is easier to read and debug!
    // Note we probably could use UTF-8???
    for ($i = 0; $i < $len; $i++)
    {
    $c = ord(substr($txt, $i, 1));
    if (($c > 127) || ($c < 0x20))
    { $result .= '='.strtoupper(dechex($c));
    }
    else
    {
    switch ($c)
    {
    case 0x20: $result .= '_'; break; // space
    case 0x22:
    case 0x28:
    case 0x29:
    case 0x2C:
    case 0x2E:
    case 0x2F:
    case 0x3A:
    case 0x3B:
    case 0x3C:
    case 0x3D:
    case 0x3E:
    case 0x3F:
    case 0x40:
    case 0x5B:
    case 0x5D: $result .= '='.strtoupper(dechex($c)); break; // Special chars
    default: $result .= chr($c); // default chars
    }
    }
    }
    $result .= '?='; // end of encoding
    }
    else
    { $result = $txt;
    }
    return $result;
    }

    (well it’s probably not “state-of-the-art” programming but it works!).

Viewing 4 replies - 1 through 4 (of 4 total)