1. Kayako Download customers: we will continue to develop and support Kayako Download beyond July 2017, alongside the new Kayako for existing customers.

    Find out more.

  2. The forum you are viewing relates to Kayako Classic. If you signed up or upgraded to the new Kayako (after the 4th July 2016), the information in this thread may not apply to you. You can visit the forums for the new Kayako here.

Recommended Allowable HTML Tags

Discussion in 'Using Kayako Classic' started by tallen-bt, Sep 1, 2011.

  1. Gary McGrath

    Gary McGrath Staff Member

    I can't actually replicate your issue, so this next fix is pretty much just from looking at your screen shots, give it a try

    N.b. it wont fix your signature, you need to change that to: Trevor Allen<br><b>Help Desk Technician</b>

    Gary
     

    Attached Files:

  2. tallen-bt

    tallen-bt Established Member

    It may just be that my signature assumes it would be placed on a new line... but that is being converted into either a break or paragraph which makes it into double spaces... Going to test your file though.

    EDIT:
    HTML:
    More testing!!!!!!! Testing!!!<br />Test! <br />Trevor Allen<br /> <b>Help Desk Technician</b>
    Obviously <p> is getting stripped now correct? That is what was separating More Testing and Testing in the editor but when sent are put on the same line. The rest works as intended and the unchanged signature is fine as well.

    EDIT 2:
    The email copies are obviously working just fine. Hopefully Kayako implements HTMLPurifier soon as it most likely would clean out a lot of these issues better...:rolleyes:
     
  3. Gary McGrath

    Gary McGrath Staff Member

    Ok,

    This one puts back the p's but leaves in the fix for the double BR

    Gary
     

    Attached Files:

  4. tallen-bt

    tallen-bt Established Member

    I think that did it! Any idea why I was getting double BRs?
     
  5. Gary McGrath

    Gary McGrath Staff Member

    It looks like tinyMCE was adding /r/n and <br /> when going to a new line.

    In the code, for html, it converts /r/n to <br />, hence why it changed to two BR's. I altered it to remove the /r/n from the post contents when submitting from tinyMCE

    Gary
     
  6. tallen-bt

    tallen-bt Established Member

    Ahhhh ok, I was looking into TinyMCE and there are configuration options using the init() function which I thought I found in core.js. But that didn't seem to take any effect. One of them is to clean out new line endings and or force BRs or Ps. http://www.tinymce.com/forum/viewtopic.php?id=7415
     
  7. Gary McGrath

    Gary McGrath Staff Member

    Look around line 615, thats the tinyMCE init function, there is actually newline stuff there, and its forced to yes currently.

    Once you change it, you will need to goto admin CP, diagnostics, rebuild cache. You will then also need to clear out your temp internet files.

    Gary
     
  8. tallen-bt

    tallen-bt Established Member

    Is that an actual init? I can't find that word in the document... there is TinyMCE.TinyMCE and then I see options... but no init. Probably missed something.
     
  9. Gary McGrath

    Gary McGrath Staff Member

    Yeah, that is the actual int function, its confusing as its not "all of it", as the full init function is "built" by a few calls which are all put together to form the final init. but thats the bit you need to edit for it to take effect.

    ( Although if its now all working, then you don't need to mess and break it lol )

    Gary
     
  10. tallen-bt

    tallen-bt Established Member

    Good to know though! Haha thanks for all the help!
     
  11. Gary McGrath

    Gary McGrath Staff Member

    Your welcome :)

    Gary
     
  12. indesigns

    indesigns Established Member

    I am using 4.01.326 with the modications that pol67 mentioned above and it works. works for 4.01.325 and 4.01.326. talking to kayako I know there are at the fixed audit stage. Also they are working on inline images too.
     
  13. indesigns

    indesigns Established Member

    here is my list, in alpha order

    Allowable HTML Tags
    a,b,br,div,font,hr,i,img,li,ol,p,span,strong,table,tbody,th,tr,td,u,ul

    Allowable HTML Tags Attributes
    class,color,href,id,rel,size,src
     
  14. Gary McGrath

    Gary McGrath Staff Member

    Everyone here is on the latest version, thats the one which was giving errors ( mostly due to badly formatted html coming from outlook ), the changes here actually assume you have the latest version and have applied all the dev fixes.

    Gary
     
  15. stevenutt

    stevenutt Established Member

    As Gary said we are all on 4.01.326, we would love to see kayako do all this, but although they have given pol67 some extra fixes none of the rest of us have seen it, so the guru who is Gary stepped in and fixed all the style stuff for us.
    Oh and yes I have heard talk of the inline image stuff, but haven't seen a dev ticket or any more info appearing on the forum post.

    p.s. For those using the tiny MCE Editor I have changed my function to:
    (__swift\themes\admin_default\core.js)

    Code:
    function LoadTinyMCE() { if
    (!$('.tinymce').length) { return false; }
    $('.tinymce').tinymce({
    // General options
    script_url : swiftpath +
    '__swift/thirdparty/TinyMCE/tiny_mce_gzip.php',
    theme : "advanced",
    plugins : "safari,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
    
    // Theme options
    theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,forecolor,backcolor,|,cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,code,|,sub,sup,|,charmap,media,advhr,|,ltr,rtl,|,fullscreen,|,mcehelp",
    theme_advanced_buttons2 : "",
    theme_advanced_buttons3 : "",
    theme_advanced_toolbar_location : "top",
    theme_advanced_toolbar_align : "left",
    theme_advanced_statusbar_location : "bottom",
    theme_advanced_resizing : true,
    paste_text_sticky : true,
    force_br_newlines : true,
    force_p_newlines : false,
    gecko_spellcheck : true,
    forced_root_block : '',
    content_css : swiftpath +
    '__swift/themes/admin_default/tinymce.css' });};
    which forces br newlines and kills p new lines plus moves everything we need (we don't use any font formatting stuff as everything is reformatted by the template on email). mceEd.JPG
     
  16. tallen-bt

    tallen-bt Established Member

    You could just have it clear new lines Stevenutt and not worry about converting them to Ps or BRs, it can also remove redundant BRs. :)
    Code:
    function LoadTinyMCE() {
        if (!$('.tinymce').length) {
            return false;
        }
    
        $('.tinymce').tinymce({
            // General options
            script_url : swiftpath + '__swift/thirdparty/TinyMCE/tiny_mce_gzip.php',
            theme : "advanced",
            plugins : "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
    
            // Theme options
            theme_advanced_buttons1 : "formatselect,fontselect,fontsizeselect,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,forecolor,backcolor",
            theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,code,|,insertdate,inserttime,preview",
            theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,media,advhr,pagebreak|,ltr,rtl,|,fullscreen",
            theme_advanced_toolbar_location : "top",
            theme_advanced_toolbar_align : "left",
            theme_advanced_statusbar_location : "bottom",
            theme_advanced_resizing : true,
            convert_newlines_to_brs : false,
            force_br_newlines : false,
            force_p_newlines : true,
            remove_redundant_brs : true,
            remove_linebreaks : true,
              forced_root_block : '',
            content_css : swiftpath + '__swift/themes/admin_default/tinymce.css'
        });
    };
     
  17. tallen-bt

    tallen-bt Established Member

    Hi Gary!
    We have noticed an issue now with our fix that plain-text emails being sent in to us are getting their spacing stripped out, my guess is from our P and BR changes. We basically get a GIANT wall of text.
     
  18. Gary McGrath

    Gary McGrath Staff Member

    Yeah, I think I know why, try this one instead:

    Gary
     

    Attached Files:

  19. tallen-bt

    tallen-bt Established Member

    It doesn't appear to have changed anything. We get this issue also when we forward tickets, the spacing is gone in the ticket view as well.
     
  20. Gary McGrath

    Gary McGrath Staff Member

    The change I made was for it to stop affecting incoming email replies, forwarding is a totally seperate function.

    The issue is removing the double BR's coming from the tinyMCE editor is breaking the forward/email replies.

    Try this one

    N.B. This WILL NOT fix replies that you already got, it will only effect NEW replies ( in case your looking at an old one to see if its fixed it. )

    Gary
     

    Attached Files:

Share This Page