FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » code /php display borked in RC 9
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
code /php display borked in RC 9 [message #15130] Wed, 03 December 2003 16:46 Go to previous message
Olliver   Germany
Messages: 443
Registered: March 2002
Karma:
Senior Member
Hello,
as the headline says there's an issue affecting both php and code tags:

If some code is displayed by one of these tags, RC9 will add an additional newline for each newline. This is very annoying when it comes to larger code blocks

Demonstration:

  // avoid trails of query strings which aren't relevant for page counting

  function filter_uri() {

    $uri = (!empty($_SERVER["URL"]) ? $this->clean($_SERVER["URL"]) : $this->clean($_SERVER["REQUEST_URI"]));

    $uri = (strstr($uri, "://") ? "/" : $uri);

    $autoparts = explode("/", str_replace("//", "/", $uri));



    if (isset($uri)) unset($uri);

    $uri = "/";



    for ($i = 0, $max = count($autoparts); $i < $max; ++$i) {

      $match = strpos(($trimmed = trim($autoparts[$i])), "?");



      if ($match === 0) break;

      else $trimmed = ($match ? substr($trimmed, 0, $match) : $trimmed);

      if (realpath($trimmed)) {

        $test = explode(".", $trimmed);

        $first = strtolower(trim($test[0]));

        $uri .= (((count($test) === 2) && ($first == "index") || ($first == "default")) ? "" : $trimmed);

        break;

      }

      elseif ($trimmed === "") continue;

      else $uri .= $trimmed."/";

    }

    return $uri;

  }


(snippet by BBClone, Gnu/GPL)

Expected result would be code just like the <pre> tag in HTML would generate.

On another node, I find the light green background for code plain ugly, it doesn't fit very well to the rest of the default layout. Maybe it would be wiser to use a similiar background color as for quotes.

Olliver
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Mysterious Problems
Next Topic: v2.6.0RC9 double spaces in replies
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Nov 22 22:28:51 GMT 2024

Total time taken to generate the page: 0.04672 seconds