HTML validation

This commit is contained in:
Marcin Kurczewski 2013-11-27 17:42:26 +01:00
parent 89a1b1acf7
commit ef70c1523f
4 changed files with 5 additions and 5 deletions

View file

@ -126,7 +126,7 @@ class CustomMarkdown extends \Michelf\Markdown
$link = \Chibi\UrlHelper::route('post', 'list', ['query' => '_query_']); $link = \Chibi\UrlHelper::route('post', 'list', ['query' => '_query_']);
return preg_replace_callback('{\[search\]((?:[^\[]|\[(?!\/?search\]))+)\[\/search\]}is', function($x) use ($link) return preg_replace_callback('{\[search\]((?:[^\[]|\[(?!\/?search\]))+)\[\/search\]}is', function($x) use ($link)
{ {
return $this->hashPart('<a href="' . str_replace('_query_', $x[1], $link) . '">' . $x[1] . '</a>'); return $this->hashPart('<a href="' . str_replace('_query_', urlencode($x[1]), $link) . '">' . $x[1] . '</a>');
}, $text); }, $text);
} }
} }

View file

@ -3,12 +3,12 @@
<h1>mass tag</h1> <h1>mass tag</h1>
<div> <div>
<label class="left" for="mass-tag-query">Search query:</label> <label class="left" for="mass-tag-query">Search query:</label>
<div class="input-wrapper"><input class="autocomplete" type="text" type="text" name="query" id="mass-tag-query" value="<?php echo isset($this->context->massTagQuery) ? $this->context->massTagQuery : '' ?>" data-autocomplete-url="<?php echo \Chibi\UrlHelper::route('tag', 'list') ?>"/></div> <div class="input-wrapper"><input class="autocomplete" type="text" name="query" id="mass-tag-query" value="<?php echo isset($this->context->massTagQuery) ? $this->context->massTagQuery : '' ?>" data-autocomplete-url="<?php echo \Chibi\UrlHelper::route('tag', 'list') ?>"/></div>
</div> </div>
<div> <div>
<label class="left" for="mass-tag-tag">Tag:</label> <label class="left" for="mass-tag-tag">Tag:</label>
<div class="input-wrapper"><input class="autocomplete" type="text" type="text" name="tag" id="mass-tag-tag" value="<?php echo isset($this->context->massTagTag) ? $this->context->massTagTag : '' ?>" data-autocomplete-url="<?php echo \Chibi\UrlHelper::route('tag', 'list') ?>"/></div> <div class="input-wrapper"><input class="autocomplete" type="text" name="tag" id="mass-tag-tag" value="<?php echo isset($this->context->massTagTag) ? $this->context->massTagTag : '' ?>" data-autocomplete-url="<?php echo \Chibi\UrlHelper::route('tag', 'list') ?>"/></div>
</div> </div>
<input type="hidden" name="submit" value="1"/> <input type="hidden" name="submit" value="1"/>

View file

@ -3,7 +3,7 @@
<h1>merge tags</h1> <h1>merge tags</h1>
<div> <div>
<label class="left" for="merge-source-tag">Source tag:</label> <label class="left" for="merge-source-tag">Source tag:</label>
<div class="input-wrapper"><input class="autocomplete" type="text" type="text" name="source-tag" id="merge-source-tag" data-autocomplete-url="<?php echo \Chibi\UrlHelper::route('tag', 'list') ?>"/></div> <div class="input-wrapper"><input class="autocomplete" type="text" name="source-tag" id="merge-source-tag" data-autocomplete-url="<?php echo \Chibi\UrlHelper::route('tag', 'list') ?>"/></div>
</div> </div>
<div> <div>

View file

@ -3,7 +3,7 @@
<h1>rename tags</h1> <h1>rename tags</h1>
<div> <div>
<label class="left" for="rename-source-tag">Source tag:</label> <label class="left" for="rename-source-tag">Source tag:</label>
<div class="input-wrapper"><input class="autocomplete" type="text" type="text" name="source-tag" id="rename-source-tag" data-autocomplete-url="<?php echo \Chibi\UrlHelper::route('tag', 'list') ?>"/></div> <div class="input-wrapper"><input class="autocomplete" type="text" name="source-tag" id="rename-source-tag" data-autocomplete-url="<?php echo \Chibi\UrlHelper::route('tag', 'list') ?>"/></div>
</div> </div>
<div> <div>