00074: search results are wrapped in <p> and </p> tags

Summary: search results are wrapped in <p> and </p> tags
Created: 2004-10-06 22:44
Status: Closed - fixed for 2.0.beta18
Category: Bug
From: jr
Assigned:
Priority: 2
Version: 2.0 dev 11
OS: all

Description: Search results page produces:

  <p>Results of search for <em>toc</em>:
  <p class='vspace'></p><dl class='fplbygroup'>
  ...</dl>
  <p class='vspace'></p>4 pages found out of 51 pages searched.
  <p class='vspace'></p>
  </p>

It should perhaps produce

  <p>Results of search for <em>toc</em>:
  </p><p class='vspace'></p><dl class='fplbygroup'>
   ...</dl>
  <p class='vspace'></p>4 pages found out of 51 pages searched.
  <p class='vspace'></p><p>
  </p>

This is definitely a bug. Unfortunately, the fix isn't quite so easy--the best I can come up with is to treat [:searchresults:] as a block level markup instead of inline markup. I'll come up with a fix eventually... --Pm


Fixed for 2.0.beta18. PmWiki now considers any line containing an HTML block markup to appear in its own "top-level" <div> unless there's already a block identifier at the start of the line. --Pm

Array
(
    [post_max_size] => 64M
    [$_POST keys] => 
    [$_REQUEST keys] => n
    [$_SERVER] => Array
        (
            [CONTEXT_DOCUMENT_ROOT] => /home/pmwiki/public_html
            [CONTEXT_PREFIX] => 
            [DOCUMENT_ROOT] => /home/pmwiki/public_html
            [GATEWAY_INTERFACE] => CGI/1.1
            [HTTPS] => on
            [HTTP_ACCEPT] => */*
            [HTTP_ACCEPT_ENCODING] => gzip, br, zstd, deflate
            [HTTP_HOST] => www.pmwiki.org
            [HTTP_REFERER] => http://www.pmwiki.org/wiki/PITS/00074
            [HTTP_USER_AGENT] => Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
            [HTTP_X_HTTPS] => 1
            [PATH] => /bin:/usr/bin
            [PHP_INI_SCAN_DIR] => /opt/cpanel/ea-php70/root/etc:/opt/cpanel/ea-php70/root/etc/php.d:.
            [QUERY_STRING] => n=PITS%2f00074
            [REDIRECT_HTTPS] => on
            [REDIRECT_QUERY_STRING] => n=PITS%2f00074
            [REDIRECT_SCRIPT_URI] => https://www.pmwiki.org/wiki/PITS/00074
            [REDIRECT_SCRIPT_URL] => /wiki/PITS/00074
            [REDIRECT_SSL_TLS_SNI] => www.pmwiki.org
            [REDIRECT_STATUS] => 200
            [REDIRECT_UNIQUE_ID] => afSEAvxXS-86o-LawHQOtQAAANA
            [REDIRECT_URL] => /wiki/PITS/00074
            [REMOTE_ADDR] => 216.73.216.25
            [REMOTE_PORT] => 31861
            [REQUEST_METHOD] => GET
            [REQUEST_SCHEME] => https
            [REQUEST_URI] => /wiki/PITS/00074
            [SCRIPT_FILENAME] => /home/pmwiki/public_html/index.php
            [SCRIPT_NAME] => /index.php
            [SCRIPT_URI] => https://www.pmwiki.org/wiki/PITS/00074
            [SCRIPT_URL] => /wiki/PITS/00074
            [SERVER_ADDR] => 23.254.203.248
            [SERVER_ADMIN] => webmaster@pmwiki.org
            [SERVER_NAME] => www.pmwiki.org
            [SERVER_PORT] => 443
            [SERVER_PROTOCOL] => HTTP/1.1
            [SERVER_SIGNATURE] => 
            [SERVER_SOFTWARE] => Apache
            [SSL_TLS_SNI] => www.pmwiki.org
            [TZ] => America/Los_Angeles
            [UNIQUE_ID] => afSEAvxXS-86o-LawHQOtQAAANA
            [PHP_SELF] => /index.php
            [REQUEST_TIME_FLOAT] => 1777632258.202
            [REQUEST_TIME] => 1777632258
            [argv] => Array
                (
                    [0] => n=PITS%2f00074
                )

            [argc] => 1
        )

)