HTML validation

This commit is contained in:
Marcin Kurczewski 2013-11-18 14:00:54 +01:00
parent 5eb5e18b77
commit a5d0a3f9ef
6 changed files with 12 additions and 12 deletions

@ -1 +1 @@
Subproject commit bf824e781c520a85a82394622a5fefd5c178379f Subproject commit 5008621b75431073ca8dd6537a112c9f95436e54

View file

@ -80,12 +80,12 @@ class PostController
$this->context->transport->searchQuery = $formQuery; $this->context->transport->searchQuery = $formQuery;
if (strpos($formQuery, '/') !== false) if (strpos($formQuery, '/') !== false)
throw new SimpleException('Search query contains invalid characters'); throw new SimpleException('Search query contains invalid characters');
$url = \Chibi\UrlHelper::route('post', 'list', ['source' => $source, 'additionalInfo' => $additionalInfo, 'query' => urlencode($formQuery)]); $url = \Chibi\UrlHelper::route('post', 'list', ['source' => $source, 'additionalInfo' => $additionalInfo, 'query' => $formQuery]);
\Chibi\UrlHelper::forward($url); \Chibi\UrlHelper::forward($url);
return; return;
} }
$query = trim(urldecode($query)); $query = trim($query);
$page = intval($page); $page = intval($page);
$postsPerPage = intval($this->config->browsing->postsPerPage); $postsPerPage = intval($this->config->browsing->postsPerPage);
$this->context->subTitle = 'posts'; $this->context->subTitle = 'posts';

View file

@ -126,7 +126,7 @@ class TagController
$suppliedQuery = ' '; $suppliedQuery = ' ';
$suppliedTag = InputHelper::get('tag'); $suppliedTag = InputHelper::get('tag');
$suppliedTag = Model_Tag::validateTag($suppliedTag); $suppliedTag = Model_Tag::validateTag($suppliedTag);
\Chibi\UrlHelper::forward(\Chibi\UrlHelper::route('post', 'list', ['source' => 'mass-tag', 'query' => urlencode($suppliedQuery), 'additionalInfo' => $suppliedTag])); \Chibi\UrlHelper::forward(\Chibi\UrlHelper::route('post', 'list', ['source' => 'mass-tag', 'query' => $suppliedQuery, 'additionalInfo' => $suppliedTag]));
} }
} }
} }

View file

@ -13,7 +13,7 @@
</div> </div>
<div class="footer"> <div class="footer">
<span class="left"> <div class="left">
Tags:&nbsp; Tags:&nbsp;
<ul class="tags"> <ul class="tags">
<?php foreach ($this->context->featuredPost->sharedTag as $tag): ?> <?php foreach ($this->context->featuredPost->sharedTag as $tag): ?>
@ -24,9 +24,9 @@
</li> </li>
<?php endforeach ?> <?php endforeach ?>
</ul> </ul>
</span> </div>
<span class="right"> <div class="right">
Featured&#32; Featured&#32;
<?php if ($this->context->featuredPostUser): ?> <?php if ($this->context->featuredPostUser): ?>
by <a href="<?php echo \Chibi\UrlHelper::route('user', 'view', ['name' => $this->context->featuredPostUser->name]) ?>"><?php echo $this->context->featuredPostUser->name ?></a>,&#32; by <a href="<?php echo \Chibi\UrlHelper::route('user', 'view', ['name' => $this->context->featuredPostUser->name]) ?>"><?php echo $this->context->featuredPostUser->name ?></a>,&#32;
@ -39,7 +39,7 @@
<?php else: ?> <?php else: ?>
<?php printf('%d days ago', $x) ?> <?php printf('%d days ago', $x) ?>
<?php endif ?> <?php endif ?>
</span> </div>
<div class="clear"></div> <div class="clear"></div>
</div> </div>

View file

@ -103,7 +103,7 @@
<?php endif ?> <?php endif ?>
<span><a href="<?php echo SZURU_LINK ?>">szurubooru v<?php echo SZURU_VERSION ?></a></span> <span><a href="<?php echo SZURU_LINK ?>">szurubooru v<?php echo SZURU_VERSION ?></a></span>
<?php if (PrivilegesHelper::confirm(Privilege::ListLogs)): ?> <?php if (PrivilegesHelper::confirm(Privilege::ListLogs)): ?>
<span><a href="<?php echo \Chibi\UrlHelper::route('log', 'list') ?>">Logs</span> <span><a href="<?php echo \Chibi\UrlHelper::route('log', 'list') ?>">Logs</a></span>
<?php endif ?> <?php endif ?>
</div> </div>
</footer> </footer>

View file

@ -1,6 +1,6 @@
<form action="<?php echo \Chibi\UrlHelper::route('user', 'settings', ['name' => $this->context->transport->user->name]) ?>" method="post" class="settings aligned"> <form action="<?php echo \Chibi\UrlHelper::route('user', 'settings', ['name' => $this->context->transport->user->name]) ?>" method="post" class="settings aligned">
<div class="safety"> <div class="safety">
<label class="left" for="name">Safety:</label> <label class="left">Safety:</label>
<div class="input-wrapper"> <div class="input-wrapper">
<?php foreach (PostSafety::getAll() as $safety): ?> <?php foreach (PostSafety::getAll() as $safety): ?>
<?php if (PrivilegesHelper::confirm(Privilege::ListPosts, PostSafety::toString($safety))): ?> <?php if (PrivilegesHelper::confirm(Privilege::ListPosts, PostSafety::toString($safety))): ?>
@ -12,10 +12,10 @@
</div> </div>
<div class="endless-scrolling"> <div class="endless-scrolling">
<label class="left" for="name">Endless scrolling:</label> <label class="left" for="endless-scrolling">Endless scrolling:</label>
<div class="input-wrapper"> <div class="input-wrapper">
<label> <label>
<input type="checkbox" name="endless-scrolling" <?php if ($this->context->transport->user->hasEnabledEndlessScrolling()) echo ' checked="checked"' ?>/> <input type="checkbox" id="endless-scrolling" name="endless-scrolling" <?php if ($this->context->transport->user->hasEnabledEndlessScrolling()) echo ' checked="checked"' ?>/>
Enabled Enabled
</label> </label>
</div> </div>