Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Html Formatter

12346»

Comments

  • I've just written a little addon to this code that allows high quality YouTube videos to be added. Previously you would use<video type="youtube">osd9f435olim</video>and you still can use that for normal quality, but if you want to use high quality you just change it to <video type="youtubehq">osd9f435olim</video>To do this, replace lines 61 to 62 with this:if(HTML_VIDEO_TAG) $Html_VideoLinks = array( 'youtubehq' => '<object width="480" height="360"><param name="movie" value="http://www.youtube.com/v/VIDEO_ID&ap=%2526fmt%3D18"></param>'. '<embed src="http://www.youtube.com/v/VIDEO_ID&ap=%2526fmt%3D18" type="application/x-shockwave-flash" width="480" height="360"></embed>'. '</object>', I hope that helps people, and hopefully sirnot will update this extension to add that code by default when he gets a chance
  • Is it possible to be able to insert java code? I have a couple links to forms on our site that I want to open as popups, I have a simple java script from main forms page that does this, but when inserted in a message in the forum, it displays the content of the script tag instead of using it. My forum is only open to members of my graduating class so I am not worried about security issues in the java, and I would even be happier if I could just enable it for me and my other admins
  • Hi, I've noticed the "link" function creates a link that opens in the same window/tab. Is there a way to format links that are posted in comments so they automatically open into a new tab? Thanks.
  • Hi there,

    I've posted in the markdown formatter thread about getting the markdown plugin to accept HTML (as per the markdown spec.) by making it run the markdown output through this HTML formatter (if it is also installed). To do this though, I have had to alter (slightly) the HTML formatter so that I could use it's parsing abilities, without it converting newlines.

    I thought I'd submit my changes here, too. If they were added to the HTML formatter, it would allow the HTML formatter to also provide a general HTML parsing service to other plugins, which might be useful.

    --- default.php.orig 2009-03-19 13:02:20.000000000 +0000 +++ default.php 2009-03-19 13:04:46.000000000 +0000 @@ -111,7 +111,7 @@ $this->TagArray = &$GLOBALS['Html_TagArray']; } - function Execute($String) + function Execute($String, $ParseOnly) { $this->TagArray = array('normal' => array(), 'extraclosing' => array()); $String = str_replace(chr(0), ' ', $String); @@ -172,7 +172,7 @@ $sReturn ); - if(HTML_CONVERT_NEWLINES) + if(HTML_CONVERT_NEWLINES && !$ParseOnly) $sReturn = str_replace( array("\r\n", "\r", "\n"), '<br />', @@ -389,7 +389,7 @@ function Parse($String, $Object, $FormatPurpose) { - if($FormatPurpose == FORMAT_STRING_FOR_DISPLAY) $sReturn = $this->Execute($String); + if($FormatPurpose == FORMAT_STRING_FOR_DISPLAY) $sReturn = $this->Execute($String, false); else $sReturn = $String; return $this->ParseChildren($sReturn, $Object, $FormatPurpose);
  • I've not tried that edam (or anything else for a long time actually) but it looks like a damned good idea, so thanks :)
  • is there a way to get tangle.com videos to work?
    thanks in advance!
  • @jhart: if you haven't already, you have to remove 'embed' from the list of disallowed tags on line 76 of HtmlFormatter's default.php.
  • Can anyone tell me why the html formatter does not load properly. Along the menu, some image do not work, but instead come up as text. See image below to understand. How can I fix this? [URL=http://img15.imageshack.us/i/htmlformatter.jpg/][IMG]http://img15.imageshack.us/img15/9282/htmlformatter.th.jpg[/IMG][/URL]
  • I guess nobody has seen this problem before. If you can help (the above post) please advise.
  • I have modified my HtmlFormatter, and I thought I would share it. My version differs from the official one in two ways. First, I have added support for more video sites, such as Flickr and Vimeo. I can add support for almost any site that allows embeds, if I have an example embed, and they follow a simple pattern.

    Secondly, I have added a new tag . This tag can be used to put mathematical formulas into a post. It uses the Google Chart API to generate the images.

    You can find my modified version at this URL

    http://gist.github.com/303578

    Enjoy.
  • I'm pretty sure this Addon has as serious security flaw. Basically, if a user selects "text" instead of HTML they are able to enter any HTML or script tags they want.
Sign In or Register to comment.