Returns the HTML for the search results.<p>

@return the HTML for the search results
971996
private String createSearchResults() {

        String query = m_searchParams.getQuery();
        StringBuffer result = new StringBuffer();
        if (!CmsStringUtil.isEmptyOrWhitespaceOnly(query) && (query.length() > 3)) {
            CmsSearchResultView resultView = new CmsSearchResultView(getJsp());
            // proprietary workplace admin link for pagelinks of search:
            resultView.setSearchRessourceUrl(
                getJsp().link(
                    "/system/workplace/views/admin/admin-main.jsp?path=/searchindex/singleindex/search&indexname="
                        + getSearchIndexIndex().getName()));
            m_search.init(getCms());

            // custom parameters (non-widget controlled)
            // these are from generated search page links
            String page = getJsp().getRequest().getParameter("searchPage");
            if (!CmsStringUtil.isEmptyOrWhitespaceOnly(page)) {
                m_searchParams.setSearchPage(Integer.parseInt(page));
            }
            String categories = getJsp().getRequest().getParameter("searchCategories");
            if (!CmsStringUtil.isEmptyOrWhitespaceOnly(categories)) {
                m_searchParams.setCategories(CmsStringUtil.splitAsList(categories, ','));
            }

            String searchRoots = getJsp().getRequest().getParameter("searchRoots");
            if (!CmsStringUtil.isEmptyOrWhitespaceOnly(searchRoots)) {
                m_searchParams.setSearchRoots(searchRoots);
            }
            m_search.setParameters(m_searchParams);
            result.append("<div style=\"padding:12px;\">\n").append(resultView.displaySearchResult(m_search)).append(
                "\n</div>\n");
        } else {
            // Just don't perform search
        }
        return result.toString();
    }
634268
public String displaySearchResult(CmsSearch search) {

        StringBuffer result = new StringBuffer(800);
        Locale locale = m_jsp.getRequestContext().getLocale();
        CmsMessages messages = org.opencms.search.Messages.get().getBundle(locale);

        result.append("<h3>\n");
        result.append(messages.key(org.opencms.search.Messages.GUI_HELP_SEARCH_RESULT_TITLE_0));
        result.append("\n</h1>\n");
        List<CmsSearchResult> searchResult;
        if (CmsStringUtil.isEmptyOrWhitespaceOnly(search.getQuery())) {
            search.setQuery("");
            searchResult = Collections.emptyList();
        } else {
            search.setMatchesPerPage(5);
            searchResult = search.getSearchResult();
        }

        HttpServletRequest request = m_jsp.getRequest();
        // get the action to perform from the request
        String action = request.getParameter("action");

        if ((action != null) && (searchResult == null)) {
            result.append("<p class=\"formerror\">\n");
            if (search.getLastException() != null) {

                result.append(messages.key(org.opencms.search.Messages.GUI_HELP_SEARCH_UNAVAILABLE_0));
                result.append("\n<!-- ").append(search.getLastException().toString());
                result.append(" //-->\n");
            } else {
                result.append(messages.key(org.opencms.search.Messages.GUI_HELP_SEARCH_NOMATCH_1, search.getQuery()));
                result.append("\n");
            }
            result.append("</p>\n");
        } else if ((action != null) && (searchResult.size() <= 0)) {
            result.append("<p class=\"formerror\">\n");
            result.append(messages.key(org.opencms.search.Messages.GUI_HELP_SEARCH_NOMATCH_1, search.getQuery()));
            result.append("\n");
            result.append("</p>\n");
        } else if ((action != null) && (searchResult.size() > 0)) {
            result.append("<p>\n");
            result.append(messages.key(org.opencms.search.Messages.GUI_HELP_SEARCH_RESULT_START_0));
            result.append("\n");
            result.append("</p>\n<p>\n");

            Iterator<CmsSearchResult> iterator = searchResult.iterator();

            try {
                if (m_exportLinks) {
                    m_jsp.getRequestContext().setCurrentProject(m_onlineProject);
                }

                String name;
                String path;
                while (iterator.hasNext()) {
                    CmsSearchResult entry = iterator.next();
                    result.append("\n<div class=\"searchResult\">");
                    result.append("<a class=\"navhelp\" href=\"#\" onclick=\"javascript:window.open('");
                    // CmsJspActionElement.link() is not programmed for using from root site
                    // because it assumes the "default CmsSite" when no configured site matches the
                    // root site "/":
                    if (CmsStringUtil.isEmptyOrWhitespaceOnly(m_jsp.getRequestContext().getSiteRoot())) {
                        // link will always cut off "/sites/default" if we are in the
                        // root site, this call is only used to get the scheme, host, context name and servlet name...
                        path = m_jsp.link(OpenCms.getSiteManager().getDefaultSite().getSiteRoot() + "/")
                            + entry.getPath().substring(1);
                    } else {
                        path = m_jsp.link(entry.getPath());
                    }
                    result.append(path);
                    result.append(
                        "', '_blank', 'width='+screen.availWidth+', height='+ screen.availHeight+', scrollbars=yes, menubar=yes, toolbar=yes')\"");
                    result.append("\">\n");
                    name = entry.getField(CmsSearchField.FIELD_TITLE);
                    if (name == null) {
                        name = entry.getPath();
                    }
                    result.append(name);
                    result.append("</a>");
                    result.append("&nbsp;(").append(entry.getScore()).append("&nbsp;%)\n");

                    result.append("<span class=\"searchExcerpt\">\n");
                    String excerptString = entry.getExcerpt();
                    if (CmsStringUtil.isEmptyOrWhitespaceOnly(excerptString)) {
                        result.append(messages.key(org.opencms.search.Messages.GUI_HELP_SEARCH_EXCERPT_UNAVAILABLE_0));
                    } else {
                        result.append(excerptString).append('\n');
                    }
                    result.append("</span>\n");
                    result.append("</div>\n");
                }
            } finally {
                m_jsp.getRequestContext().setCurrentProject(m_offlineProject);
            }

            result.append("</p>\n");

            // search page links below results
            if ((search.getPreviousUrl() != null) || (search.getNextUrl() != null)) {
                result.append("<p>");
                if (search.getPreviousUrl() != null) {

                    result.append("<a class=\"searchlink\" href=\"");
                    result.append(
                        getSearchPageLink(
                            m_jsp.link(new StringBuffer(search.getPreviousUrl()).append('&').append(
                                CmsLocaleManager.PARAMETER_LOCALE).append("=").append(
                                    m_jsp.getRequestContext().getLocale()).toString()),
                            search));
                    result.append("\">");
                    result.append(messages.key(org.opencms.search.Messages.GUI_HELP_BUTTON_BACK_0));
                    result.append(" &lt;&lt;</a>&nbsp;&nbsp;\n");
                }
                Map<Integer, String> pageLinks = search.getPageLinks();
                Iterator<Integer> i = pageLinks.keySet().iterator();
                while (i.hasNext()) {
                    int pageNumber = (i.next()).intValue();

                    result.append(" ");
                    if (pageNumber != search.getSearchPage()) {
                        result.append("<a class=\"searchlink\" href=\"").append(
                            getSearchPageLink(
                                m_jsp.link(new StringBuffer(pageLinks.get(new Integer(pageNumber))).append('&').append(
                                    CmsLocaleManager.PARAMETER_LOCALE).append("=").append(
                                        m_jsp.getRequestContext().getLocale()).toString()),
                                search));
                        result.append("\" target=\"_self\">").append(pageNumber).append("</a>\n");
                    } else {
                        result.append(pageNumber);
                    }
                }
                if (search.getNextUrl() != null) {
                    result.append("&nbsp;&nbsp;&nbsp;<a class=\"searchlink\" href=\"");
                    result.append(
                        getSearchPageLink(
                            new StringBuffer(m_jsp.link(search.getNextUrl())).append('&').append(
                                CmsLocaleManager.PARAMETER_LOCALE).append("=").append(
                                    m_jsp.getRequestContext().getLocale()).toString(),
                            search));
                    result.append("\">&gt;&gt;");
                    result.append(messages.key(org.opencms.search.Messages.GUI_HELP_BUTTON_NEXT_0));
                    result.append("</a>\n");
                }
                result.append("</p>\n");
            }

        }

        // include the post forms for the page links:
        Iterator<HTMLForm> values = m_formCache.values().iterator();
        while (values.hasNext()) {
            result.append(values.next());
        }
        return result.toString();

    }
246876
public static function html() {
            $fargs = func_get_args();
            $mode = self::enabled();
            self::enabled(self::MODE_RICH);
            $ret = self::dump(empty($fargs) ? null : $fargs[0]);
            self::enabled($mode);

            return $ret;
        }
748502
public synchronized String listHtml() {

        // check if progress should be set in the thread
        CmsProgressThread thread = null;
        int progressOffset = 0;
        if (Thread.currentThread() instanceof CmsProgressThread) {
            thread = (CmsProgressThread)Thread.currentThread();
            progressOffset = thread.getProgress();
        }

        // this block has to be executed before calling htmlBegin()
        if (isPrintable()) {
            m_visibleItems = new ArrayList<CmsListItem>(getContent());
        } else {
            m_visibleItems = new ArrayList<CmsListItem>(getCurrentPageItems());
        }

        StringBuffer html = new StringBuffer(5120);
        html.append(htmlBegin());
        if (!isPrintable()) {
            html.append(htmlTitle());
            html.append(htmlToolBar());
        } else {
            html.append("<style type='text/css'>\n");
            html.append("td.listdetailitem, \n");
            html.append(".linkdisabled {\n");
            html.append("\tcolor: black;\n");
            html.append("}\n");
            html.append(".list th {\n");
            html.append("\tborder: 1px solid black;\n");
            html.append("}\n");
            html.append(".list {\n");
            html.append("\tborder: 1px solid black;\n");
            html.append("}\n");
            html.append("</style>");
        }
        // avoiding the layout problem where, if some table cells contain a lot of text,
        // the right side of the table is cut off and can not be reached using the scroll bar.
        html.append("<!--[if IE 7]>");
        html.append("<style type='text/css'>");
        html.append("table.list * { word-wrap: break-word !important; white-space: normal !important; }");
        html.append("table.list { table-layout: fixed; }");
        html.append("</style>");
        html.append("<![endif]-->");

        html.append("<table width='100%' cellpadding='1' cellspacing='0' class='list'>\n");
        html.append(m_metadata.htmlHeader(this));
        if (m_visibleItems.isEmpty()) {
            html.append(m_metadata.htmlEmptyTable());
        } else {
            Iterator<CmsListItem> itItems = m_visibleItems.iterator();
            boolean odd = true;
            int count = 0;
            while (itItems.hasNext()) {

                // set progress in thread
                count++;
                if (thread != null) {

                    if (thread.isInterrupted()) {
                        throw new CmsIllegalStateException(
                            org.opencms.workplace.commons.Messages.get().container(
                                org.opencms.workplace.commons.Messages.ERR_PROGRESS_INTERRUPTED_0));
                    }
                    thread.setProgress(((count * (100 - progressOffset)) / m_visibleItems.size()) + progressOffset);
                    thread.setDescription(
                        org.opencms.workplace.commons.Messages.get().getBundle(thread.getLocale()).key(
                            org.opencms.workplace.commons.Messages.GUI_PROGRESS_PUBLISH_STEP4_2,
                            new Integer(count),
                            new Integer(m_visibleItems.size())));
                }

                CmsListItem item = itItems.next();
                html.append(m_metadata.htmlItem(item, odd, isPrintable()));
                odd = !odd;
            }
        }

        html.append("</table>\n");
        if (!isPrintable()) {
            html.append(htmlPagingBar());
        }
        html.append(htmlEnd());
        return getWp().resolveMacros(html.toString());
    }
1361834
public String html() {
        StringBuilder accum = StringUtil.borrowBuilder();
        html(accum);
        String html = StringUtil.releaseBuilder(accum);
        return NodeUtils.outputSettings(this).prettyPrint() ? html.trim() : html;
    }
569876
public String htmlActionBar() {

        StringBuffer html = new StringBuffer(1024);
        html.append("<td class='misc'>\n");
        html.append("\t<div>\n");
        Iterator<CmsListItemDetails> itDetails = m_itemDetails.elementList().iterator();
        while (itDetails.hasNext()) {
            I_CmsListAction detailAction = itDetails.next().getAction();
            html.append("\t\t");
            html.append(detailAction.buttonHtml());
            if (itDetails.hasNext()) {
                html.append("&nbsp;");
            }
            html.append("\n");
        }
        Iterator<I_CmsListAction> itActions = m_indepActions.elementList().iterator();
        while (itActions.hasNext()) {
            I_CmsListAction indepAction = itActions.next();
            html.append("\t\t");
            html.append("&nbsp;");
            html.append(indepAction.buttonHtml());
            html.append("\n");
        }
        html.append("\t</div>\n");
        html.append("</td>\n");
        return html.toString();
    }
232312
public function toHtml()
    {
        $this->detectOtherValues();

        $html = '';
        $html .= "<{$this->mainPaginationTag} class=\"{$this->mainCssClass}\">";
        $html .= $this->getHtml4FirstPage();
        $html .= $this->getHtml4PreviousPage();
        $html .= $this->getHtml4Pages();
        $html .= $this->getHtml4NextPage();
        $html .= $this->getHtml4LastPage();
        $html .= "</{$this->mainPaginationTag}>";

        return $html;
    }
1326591
private I_CmsSearchResultWrapper getSearchResults() {

        // The second parameter is just ignored - so it does not matter
        m_searchController.updateFromRequestParameters(pageContext.getRequest().getParameterMap(), false);
        I_CmsSearchControllerCommon common = m_searchController.getCommon();
        // Do not search for empty query, if configured
        if (common.getState().getQuery().isEmpty()
            && (!common.getConfig().getIgnoreQueryParam() && !common.getConfig().getSearchForEmptyQueryParam())) {
            return new CmsSearchResultWrapper(m_searchController, null, null, m_cms, null);
        }
        Map<String, String[]> queryParams = null;
        boolean isEditMode = CmsJspTagEditable.isEditableRequest(pageContext.getRequest());
        if (isEditMode) {
            String params = "";
            if (common.getConfig().getIgnoreReleaseDate()) {
                params += "&fq=released:[* TO *]";
            }
            if (common.getConfig().getIgnoreExpirationDate()) {
                params += "&fq=expired:[* TO *]";
            }
            if (!params.isEmpty()) {
                queryParams = CmsRequestUtil.createParameterMap(params.substring(1));
            }
        }
        CmsSolrQuery query = new CmsSolrQuery(null, queryParams);
        m_searchController.addQueryParts(query, m_cms);
        try {
            // use "complicated" constructor to allow more than 50 results -> set ignoreMaxResults to true
            // also set resource filter to allow for returning unreleased/expired resources if necessary.
            CmsSolrResultList solrResultList = m_index.search(
                m_cms,
                query.clone(), // use a clone of the query, since the search function manipulates the query (removes highlighting parts), but we want to keep the original one.
                true,
                isEditMode ? CmsResourceFilter.IGNORE_EXPIRATION : null);
            return new CmsSearchResultWrapper(m_searchController, solrResultList, query, m_cms, null);
        } catch (CmsSearchException e) {
            LOG.warn(Messages.get().getBundle().key(Messages.LOG_TAG_SEARCH_SEARCH_FAILED_0), e);
            return new CmsSearchResultWrapper(m_searchController, null, query, m_cms, e);
        }
    }
1186801
String getHTMLForAdminPage(Map<String,String> params) {
        try {
            String template = m_htmlTemplates.get("admintemplate.html");
            for (Entry<String, String> e : params.entrySet()) {
                String key = e.getKey().toUpperCase();
                String value = e.getValue();
                if (key == null) continue;
                if (value == null) value = "NULL";
                template = template.replace("#" + key + "#", value);
            }
            return template;
        }
        catch (Exception e) {
            e.printStackTrace();
        }
        return "<html><body>An unrecoverable error was encountered while generating this page.</body></html>";
    }
1318484
protected String htmlEnd() {

        StringBuffer html = new StringBuffer(512);
        html.append("\t\t\t</td></tr>\n");
        html.append("\t\t</table>\n");
        if (isBoxed()) {
            html.append(getWp().dialogBlock(CmsWorkplace.HTML_END, m_name.key(getWp().getLocale()), false));
        }
        html.append("</div>\n");
        return html.toString();
    }
303234
public String html() {
        StringBuilder sb = StringUtil.borrowBuilder();
        for (Element element : this) {
            if (sb.length() != 0)
                sb.append("\n");
            sb.append(element.html());
        }
        return StringUtil.releaseBuilder(sb);
    }
661954
public function getHtml()
    {
        $html = array();
        
        if (count($this->m_trendlines) > 0)
        {
            $this->m_options['trendlines'] = json_decode(json_encode($this->m_trendlines, JSON_FORCE_OBJECT)); 
        }
        
        # debug hacks
        $this->m_options['seriesType'] = 'lines';
        $chartType = "ScatterChart"; # LineChart
        
        $html[] = "var data = google.visualization.arrayToDataTable(" . json_encode($this->m_data, JSON_PRETTY_PRINT) . ");";
        $html[] = "var options = " . json_encode($this->m_options) . ";";
        $html[] = "var chart = new google.visualization." . $chartType . "(document.getElementById('" . $this->m_anchorId . "'));";
        
        if ($this->m_clickHandler != null)
        {
            $html[] = "google.visualization.events.addListener(chart, 'click', " . $this->m_clickHandler . ");";
        }
        
        if ($this->m_selectHandler != null)
        {
            $html[] = "google.visualization.events.addListener(chart, 'select', " . $this->m_selectHandler . ");";
        }
        
        $html[] = "chart.draw(data, options);";
        
        return implode(PHP_EOL, $html);
    }
751546
public List<WebElement> getElements() {
        List<WebElement> foundElements = null;
        try {
            if (parent == null) {
                foundElements = HtmlElementUtils.locateElements(getLocator());
            } else {
                foundElements = parent.locateChildElements(getLocator());
            }
        } catch (NoSuchElementException n) {
            addInfoForNoSuchElementException(n);
        }

        return foundElements;
    }
568197
public CmsLinkTable getLinkTable() {

        CmsLinkTable linkTable = new CmsLinkTable();
        Element links = m_element.element(CmsXmlPage.NODE_LINKS);
        if (links != null) {
            Iterator<Element> itLinks = CmsXmlGenericWrapper.elementIterator(links, CmsXmlPage.NODE_LINK);
            while (itLinks.hasNext()) {
                Element lelem = itLinks.next();
                linkTable.addLink(new CmsLink(lelem));
            }
        }
        return linkTable;
    }
191743
public function getHtml()
	{
		$s = '';
		foreach ($this->children as $child) {
			if (is_object($child)) {
				$s .= $child->render();
			} else {
				$s .= $child;
			}
		}

		return $s;
	}
1314008
public function getHtmlContent()
    {
        if ($this->htmlContent === null) {
            try {
                if (($content = $this->getContent()) === '') {
                    return $this->htmlContent = false;
                }

                $errors = libxml_use_internal_errors(true);
                $this->htmlContent = new \DOMDocument();

                if ((mb_detect_encoding($content) === 'UTF-8') && mb_check_encoding($content, 'UTF-8')) {
                    $content = mb_convert_encoding($content, 'HTML-ENTITIES', 'UTF-8');
                    $content = preg_replace('/<head[^>]*>/', '<head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">', $content);
                }

                //Remove all script elements, CDATA sections and comments (thanks https://github.com/jasny)
                //$content = preg_replace(['%<!--(?:[^-]++|-)*?-->|<!\[CDATA\[(?:[^\]]++|\])*?\]\]>%si', '%<script\b(?:"(?:[^"\\\\]++|\\\\.)*+"|\'(?:[^\'\\\\]++|\\\\.)*+\'|[^>"\']++)*>(?:[^<]++|<)*?</\s*script\s*>%si'], '', $content);

                $this->htmlContent->loadHTML($content);
                libxml_use_internal_errors($errors);
            } catch (\Exception $E) {
                return $this->htmlContent = false;
            }
        }

        return $this->htmlContent;
    }
843271
@HtmlSafe
	public String getBodyHtml()
	{
		String body = execution.getResults().trim();

		return body.replaceAll("<html>", "").replaceAll("</html>", "");
	}