htmlawed stripping linefeeds

Does anyone know how to enable line feeds with htmlawed? I copied something from one web site to a test blog post and it ompletely destroyed the formatting. Thanks in advance

  • Do you mean <br /> tags or actual hard returns (\n or \r\n)?

  • Not sure Brett. I was trying to copy an article from a CNN web page about the oil spill in the Gulf and upon previewing the page, I noticed that the formatting was stripped. Where would I go to allow both <br /> and (\n or \r\n)?

    Also, one group on my site is simply for pasting php and perl snippets from around the web and again, the formatting was stripped. Can you offer your input on this? Thanks

  • After a bit of quick testing this seems to be a multi-faceted problem including htmlawed, TinyMCE, and the autop() function.  Basically, Elgg's support for HTML formatted text is basically limited to what you can do with TinyMCE.  

    I unfortunately don't have a quick solution for you...There are a few trac tickets about this that I aim to implement for the 1.8 release.

  • htmLawed on 17th May 2010) is available now and fixed most of the formatting problems

  • Hi Luxman

    Where can I get htmLawed Was this released as part of elgg 1.7?

  • I think you should be able to download an updated version of the htmlawed library and overwrite the current library within the htmlawed plugin. Haven't tried that but it should work.

  • thanks guys - i overwrote the new library as suggested it but it hasn't solved my problem.

    Forgive me if I'm wrong but I've just started looking into this...

    The issue I have is that users can't enter symbols such as & into the single line input-text fields (which is a pain), however on international sites this is a real problem - any accented characters such as  å, ß etc are not displayed correctly. The only work around I have for this at present is to use long text/TinyMCE input boxes but this creates a long/unintuitive form for things such as the profile page.

    As I said I'm fairly new to this so not too keen on diving in and messing with the script incase I open up my site to potential attacks by mistake. I'm sure many of the international users must have come across this issue - do you have any suggestions on how to work around this?

    Many thanks

  • I just disabled it... I don't remember having these problems in 1.61

  • Here is the solution:

    I the Izap videos start.php it should be this code on line 69

     $CONFIG->htmlawed_config['elements'] = 'object, embed, params, param, b, i, ul, li, u, img, alt, a, blockquote, span, style, p, strong, em, ol, br';

    or whatever parameters you want to allow

    That will solve the stripping problem