protected function _generateTextBoxHTML($matches)
 {
     $uuid = $this->uuid();
     $type = htmlentities($matches[1], ENT_QUOTES, 'UTF-8');
     $matches[2] = QH_urlencode(strip_tags($matches[2], allowed_tags('strip_tags')));
     $placeholder = htmlentities($matches[2], ENT_QUOTES, 'UTF-8');
     if ('one-line' == $type) {
         return "<input placeholder='{$placeholder}' class='text-box' />";
     } elseif ('multi-line' == $type) {
         return "<textarea placeholder='{$placeholder}' class='text-box'></textarea>";
     }
     return "<a href='#" . QH_urlencode($definition_text) . "' id='definition-link-{$uuid}' class='definition-link'>{$link_text}</a>";
     //      "<div id='definition-body-$uuid' class='definition-body'>$definition_text</div>";
 }
 protected function _generateDefinitionHTML($matches)
 {
     $uuid = $this->uuid();
     $link_text = strip_tags(QH_urldecode($matches[1]), allowed_tags('strip_tags'));
     $matches[2] = $this->_parseImages(QH_urldecode($matches[2]));
     $definition_text = strip_tags($matches[2], allowed_tags('strip_tags'));
     return "<span data-content='" . QH_urlencode($definition_text) . "' id='definition-link-{$uuid}' class='definition-link'>" . "{$link_text}</span>";
 }
 function testDefinitionBoxes()
 {
     $content = $this->Tutorial->getStepsWithContent(10);
     $this->assertPattern('/<a[^<>]*' . QH_urlencode('shows how each term was translated.&ndash;') . '[^<>]*class=\'definition-link\'[^<>]*>Search details<\\/a>/', $content[0]['content']);
 }