escape() public static method

public static escape ( $in )
Beispiel #1
0
<?php

$title = $page->getName();
include 'header.php';
?>
<h1 id="pagetitle"><?php 
echo Markup::escape($page->getName());
?>
</h1>
<table class="history">
<?php 
foreach ($history as $entry) {
    printf('<tr><td><a href="%s?commit=%s">%s</a></td><td>%s</td><td>%s</td></tr>', $page->getURL(), $entry->commit, Markup::escape(strftime('%Y-%m-%d %H:%M', $entry->time)), Markup::escape($entry->author), Markup::escape($entry->summary));
}
?>
</table>
<?php 
include 'footer.php';
Beispiel #2
0
 public function link()
 {
     return sprintf('<a href="%s"%s>%s</a>', $this->getURL(), $this->isValid() ? '' : ' class="new"', Markup::escape($this->getName()));
 }
Beispiel #3
0
<?php

$title = 'Login';
include 'header.php';
?>
<h1 id="pagetitle"><?php 
echo Markup::escape($title);
?>
</h1>
<?php 
if ($wrong) {
    ?>
<div class="error">
Sorry, wrong username or password.
</div>
<?php 
}
?>
<form accept-charset="UTF-8" method="post" action="<?php 
echo Config::PATH;
?>
/:login<?php 
echo htmlspecialchars($goto, 0, 'UTF-8');
?>
">
<p>
    Username:
    <input type="text" name="user" class="text" />
</p>
<p>
    Password:
Beispiel #4
0
<div class="par">
    Summary of changes:
    <input type="text" name="summary" class="text" value="<?php 
echo htmlspecialchars($summary, 0, 'UTF-8');
?>
" />
    <div class="submit">
        <input type="submit" class="submit" id="edit-preview" name="preview" value="Preview" />
        <input type="submit" class="submit" value="Save changes" />
    </div>
</div>
</form>
<? else: ?>
<div class="par view-source">
    <? if (!$page_type): ?>
    This page does not exist.
    <? elseif ($page_type == WikiPage::TYPE_PAGE): ?>
    Page source:
    <div>
        <textarea rows="30" cols="80" readonly="readonly"><?php 
echo Markup::escape($content);
?>
</textarea>
    </div>
    <? else: ?>
    Sorry, no page source available.
    <? endif; ?>
</div>
<? endif; ?>
<? include('footer.php'); ?>
Beispiel #5
0
        }
        ?>
            <?php 
        foreach ($commit->changes as $change) {
            ?>
                <tr class="change">
                    <td class="type"><?php 
            echo $change->type;
            ?>
</td>
                    <td class="subject">
                        <a href="<?php 
            echo Markup::escape($change->subject_url);
            ?>
"><?php 
            echo Markup::escape($change->subject);
            ?>
</a>
                    </td>
                </tr>
            <?php 
        }
        ?>
            </table>
        <?php 
    }
    ?>
        <div style="clear: both"></div>
    </div>
<?php 
}
Beispiel #6
0
    </script>
</div>

<div class="par">
    Summary of changes:
    <input type="text" name="summary" class="text" value="<?= htmlspecialchars($summary, 0, 'UTF-8') ?>" />
    <div class="submit">
        <input type="submit" class="submit" id="edit-preview" name="preview" value="Preview" />
        <input type="submit" class="submit" value="Save changes" />
    </div>
</div>
</form>
<? else: ?>
<div class="par view-source">
    <? if (!$page_type): ?>
    This page does not exist.
    <? elseif ($page_type == WikiPage::TYPE_PAGE): ?>
    Page source:
    <div>
        <textarea rows="30" cols="80" readonly="readonly"><?= Markup::escape($content) ?></textarea>
    </div>



    <? else: ?>
    Sorry, no page source available.
    <? endif; ?>
</div>
<? endif; ?>
<? include('footer.php'); ?>
Beispiel #7
0
      no matches in file content
    <?php 
    } elseif ($result->page->getPageType() != WikiPage::TYPE_PAGE) {
        ?>
      match in binary data
    <?php 
    } else {
        ?>
      <?php 
        foreach ($result->matches as $match) {
            ?>
        <div class="match">
          <?php 
            $css_classes = array('before-match', 'match', 'after-match');
            for ($i = 0; $i < 3; $i++) {
                echo sprintf('<span class="%s">%s</span>', $css_classes[$i], Markup::escape($match->env[$i]));
            }
            ?>
        </div>
      <?php 
        }
        ?>
    <?php 
    }
    ?>
  </div>
<?php 
}
?>
</div>
<?php 
Beispiel #8
0
<? endif; ?>
<? if (Config::ALLOW_EDIT): ?>
<link rel="alternate" type="application/x-wiki" title="Edit this page!" href="<?= $page->getUrl() ?>?action=edit" />
<? endif; ?>
<? endif; ?>
<? if (isset($recent_changes_feeds)): ?>
<link rel="alternate" type="application/rss+xml" title="Recent changes (RSS 2.0)" href="<?= Config::PATH ?>/:rss20" />
<? endif; ?>
</head>
<body>
<div id="page">
<div id="linkpane">
    <? if ($user): ?>
    <div id="userinfo">
        <span id="uid"><?= Markup::escape($user->name) ?>
        &lt;<?= Markup::escape($user->email) ?>&gt;</span>
        <a href="<?= Config::PATH ?>/:profile">change password/email</a>
        <a href="<?= Config::PATH ?>/:logout">logout</a>
    </div>
    <? endif; ?>
    <? if (!Config::REQUIRE_LOGIN || $user): ?>
    <div id="globallinks">
        <a href="<?= Config::PATH ?>/">home</a>
        <a href="<?= Config::PATH ?>/:recent">recent changes</a>
        <a href="<?= Config::PATH ?>/:conflicts">unmerged conflicts (<?= $n_conflicts ?>)</a>
    </div>
    <? if (isset($page)): ?>
        <div id="pagelinks">
        <? foreach (array('view' => 'view', 'edit' => (Config::ALLOW_EDIT ? 'edit' : 'source'), 'history' => 'history') as $i => $label): ?>
            <a
                href="<?= $page->getURL() ?><?= $i == 'view' ? '' : '?action='.$i ?>"
Beispiel #9
0
?>
?action=image&amp;commit=<?php 
echo $commit_id;
?>
&amp;width=<?php 
echo Config::IMAGE_WIDTH;
?>
&amp;height=<?php 
echo Config::IMAGE_HEIGHT;
?>
" alt="<?php 
echo Markup::escape($page->getName());
?>
" />
    </a>
</p>
<p>
    <a href="<?php 
echo $page->getURL();
?>
?action=get&amp;commit=<?php 
echo $commit_id;
?>
">
        View full size: “<?php 
echo Markup::escape($page->getName());
?>
”
    </a>
</p>
Beispiel #10
0
    if ($fresh) {
        ?>
you just submitted
<?php 
    } else {
        ?>
that was submitted later on
<?php 
    }
    ?>
(right). Then you try to combine the changes: if you see a
new text passage on the left, you also add it on the right, and so on. As soon
as you are finished, click the “Save” button and <strong>the right version will become
the new
“<?php 
    echo Markup::escape($page_name);
    ?>
” page.</strong>
</p>
<p><em>
Please do NOT simply edit the page again, use this page instead.
</em></p>
<h2>This is too complicated / too much work / ...</h2>
<p>
If you do not want to perform the merge yourself—because you do not understand
what you should do here, because the page is rather long and it would be much
work, ...—you can simply leave this page and go on with what you wanted to do
next. An administrator will resolve the conflict later on.
</p>
<?php 
    if ($fresh) {
Beispiel #11
0
 protected function fmt_plain($s)
 {
     return Markup::escape($s);
 }
Beispiel #12
0
<link rel="alternate" type="application/rss+xml" title="Recent changes (RSS 2.0)" href="<?php 
echo Config::PATH;
?>
/:rss20" />
<? endif; ?>
</head>
<body>
<div id="page">
<div id="linkpane">
    <? if ($user): ?>
    <div id="userinfo">
        <span id="uid"><?php 
echo Markup::escape($user->name);
?>
        &lt;<?php 
echo Markup::escape($user->email);
?>
&gt;</span>
        <a href="<?php 
echo Config::PATH;
?>
/:profile">change password/email</a>
        <a href="<?php 
echo Config::PATH;
?>
/:logout">logout</a>
    </div>
    <? endif; ?>
    <? if (!Config::REQUIRE_LOGIN || $user): ?>
    <div id="globallinks">
        <a href="<?php 
Beispiel #13
0
    echo 'http://' . $_SERVER['SERVER_NAME'] . Config::PATH . '/:recent/' . $maxentries . '#commit-' . $commit->commit_id;
    ?>
</link>
            <?php 
    if ($commit->detail) {
        ?>
                <description><?php 
        echo Markup::escape($commit->detail);
        ?>
</description>
            <?php 
    }
    ?>
            <author><?php 
    echo Markup::escape($commit->email);
    ?>
 (<?php 
    echo Markup::escape($commit->author);
    ?>
)</author>
            <guid isPermaLink="false"><?php 
    echo $commit->commit_id;
    ?>
</guid>
        </item>
        <?php 
}
?>
  </channel>
</rss>