Displaying Code
Permalink
Is there a helper to display php and html in a content block or guestbook? I've tried using the html code tag with mixed results, content block displays OK until you try to edit, guestbook won't display at all.
I've used that, it does a nice job displaying code on a page. But it doesn't help if you want to display code in a content block, guestbook, etc.
you can use css, to style anything within some tags (usually <pre>)
I tried pre as well, same results, it works once in a content block, if you go in to edit the tags are all gone. In a guestbook it doesn't display anything. I disabled the sanitize helper when posting comments but something else is stripping things out.
You figured this out? I'm running into the same thing, need a way to show code within a content block WITHOUT it stripping the code out. I even encode the HTML using > and < but it still will remove the code once you edit the content a second time.
I ended up using the ascii codes with the html block on some pages and the highlight code block on othershttp://www.concrete5.org/marketplace/addons/highlighted_code_block/...
http://www.concrete5.org/marketplace/addons/highlighted_code_block/...