Returns the necessary html code.<p>

@param wp the jsp page to write the code to

@return html code
172703
public String groupHtml(CmsWorkplace wp) {

        StringBuffer html = new StringBuffer(512);
        html.append(htmlStart(wp));
        Iterator<CmsAdminMenuItem> itItem = m_container.elementList().iterator();
        while (itItem.hasNext()) {
            CmsAdminMenuItem item = itItem.next();
            html.append(item.itemHtml(wp));
            html.append("\n");
        }
        html.append(htmlEnd());
        return html.toString();
    }
1096554
public function get_wp_config_code() {
		$wp_config_path = Utils\locate_wp_config();

		$wp_config_code = explode( "\n", file_get_contents( $wp_config_path ) );

		$found_wp_settings = false;

		$lines_to_run = array();

		foreach ( $wp_config_code as $line ) {
			if ( preg_match( '/^\s*require.+wp-settings\.php/', $line ) ) {
				$found_wp_settings = true;
				continue;
			}

			$lines_to_run[] = $line;
		}

		if ( ! $found_wp_settings ) {
			WP_CLI::error( 'Strange wp-config.php file: wp-settings.php is not loaded directly.' );
		}

		$source = implode( "\n", $lines_to_run );
		$source = Utils\replace_path_consts( $source, $wp_config_path );
		return preg_replace( '|^\s*\<\?php\s*|', '', $source );
	}
1287715
@Override
    public String getTagHtml(Tag tag) {

        if (CmsStringUtil.isEmpty(tag.getTagName())) {
            return "";
        }
        StringBuffer result = new StringBuffer(32);
        result.append('<');
        // Tag name is the first "Attribute"...
        Iterator itAttributes = tag.getAttributesEx().iterator();
        while (itAttributes.hasNext()) {
            result.append(itAttributes.next().toString());
            // avoid trailing whitespaces like <H1 >
            // in 2nd run htmlparser 1.5 would turn the whitespace into an Attribute with null name
            if (itAttributes.hasNext()) {
                result.append(' ');
            }
        }
        result.append('>');
        return result.toString();
    }
923240
public String getHtml(String title) {

        return "<span class=\"v-icon "
            + m_styleName
            + " "
            + m_additionalButtonStyle
            + "\" title=\""
            + title
            + "\">&#x"
            + Integer.toHexString(getCodepoint())
            + ";</span>";
    }
896020
@HtmlSafe
	public String getRenderedContent()
	{
		Page page = gpUtil.getPageManager().getPage(spaceKey, getPageTitle());
		if (page == null) return gpUtil.getText("greenpepper.children.pagenotfound"); 

		StringBuilder content = new StringBuilder("{greenpepper-historic:");

		content.append(HistoricParameters.SPACEKEY).append("=").append(spaceKey)
				.append("|").append(HistoricParameters.PAGETITLE).append("=").append(page.getTitle().trim())
				.append("|").append(HistoricParameters.WIDTH).append("=").append(width)
				.append("|").append(HistoricParameters.HEIGHT).append("=").append(height)
				.append("|").append(HistoricParameters.SUT).append("=").append(sut)
				.append("|").append(HistoricParameters.SHOWIGNORED).append("=").append(showIgnored)
				.append("|").append(HistoricParameters.MAXRESULT).append("=").append(maxResult);
		
		content.append("}");

//		return gpUtil.getWikiStyleRenderer().convertWikiToXHtml(page.toPageContext(), content.toString());
		return gpUtil.getViewRenderer().render(page);
	}
544912
@Override
    public int doEndTag() throws JspException {

        ServletRequest req = pageContext.getRequest();

        // This will always be true if the page is called through OpenCms
        if (CmsFlexController.isCmsRequest(req)) {
            try {
                // Get link-string from the body and reset body
                String link = getBodyContent().getString();
                getBodyContent().clear();
                // Calculate the link substitution
                String newlink = linkTagAction(link, req, getBaseUri(), getDetailPage(), m_locale);
                // Write the result back to the page
                getBodyContent().print(newlink);
                getBodyContent().writeOut(pageContext.getOut());

            } catch (Exception ex) {
                if (LOG.isErrorEnabled()) {
                    LOG.error(Messages.get().getBundle().key(Messages.ERR_PROCESS_TAG_1, "link"), ex);
                }
                throw new JspException(ex);
            }
        }
        return EVAL_PAGE;
    }
18255
public String getPageContent(Page page)
    {
        return getWikiStyleRenderer().convertWikiToXHtml(page.toPageContext(), page.getContent());
    }
973956
public String generateHtml() {

        StringBuffer result = new StringBuffer(2048);
        result.append(htmlStart(null));
        result.append(CmsListExplorerColumn.getExplorerStyleDef());
        result.append(bodyStart("dialog", null));
        result.append(dialogStart());
        result.append(dialogContentStart(getParamTitle()));
        result.append(m_list.printableHtml());
        result.append(dialogContentEnd());
        result.append(dialogEnd());
        result.append(bodyEnd());
        result.append(htmlEnd());
        return result.toString();
    }
457475
public String toHtml() {

        CmsMacroResolver resolver = new CmsMacroResolver();
        if (CmsStringUtil.isEmpty(m_title)) {
            m_title = m_messages.key(Messages.GUI_ERROR_0, new Object[] {});
        }
        resolver.addMacro("title", m_title);
        resolver.addMacro("label_error", m_messages.key(Messages.GUI_ERROR_0, new Object[] {}));
        resolver.addMacro("errorstack", CmsException.getFormattedErrorstack(m_throwable));
        resolver.addMacro("message", CmsStringUtil.escapeHtml(getErrorMessage()));
        resolver.addMacro(
            "styleuri",
            OpenCms.getLinkManager().substituteLink(m_cms, "/system/workplace/commons/style/workplace.css"));
        if (CmsStringUtil.isEmpty(m_buttons)) {
            resolver.addMacro("buttons", getDefaultButtonsHtml());
        } else {
            resolver.addMacro("buttons", m_buttons);
            resolver.addMacro("paramaction", m_paramAction);
        }

        if (CmsStringUtil.isNotEmpty(m_hiddenParams)) {
            resolver.addMacro("hiddenparams", m_hiddenParams);
        }
        resolver.addMacro(
            "erroricon",
            OpenCms.getLinkManager().substituteLink(m_cms, "/system/workplace/resources/commons/error.png"));
        Properties errorpage = new Properties();
        try {
            errorpage.load(CmsErrorBean.class.getClassLoader().getResourceAsStream(ERRORPAGE));
        } catch (Throwable th) {
            CmsLog.INIT.error(
                org.opencms.main.Messages.get().getBundle().key(
                    org.opencms.main.Messages.INIT_ERR_LOAD_HTML_PROPERTY_FILE_1,
                    ERRORPAGE),
                th);
        }
        return resolver.resolveMacros(errorpage.getProperty("ERRORPAGE"));
    }
1197541
public function getHTML()
    {
        $loggedin = "";
        $html = "";

        $isadmin = $this->sess['isadmin'] === 1 ? true : false;

        $create = $this->setUrlCreator("comm/create");
        $del = $this->setUrlCreator("comm/admindelete");
        $viewone = $this->setUrlCreator("comm/view-one");

        $loggedin = $this->getLoginLink($isadmin, $create, $del);

        $html .= '<div class="col-sm-12 col-xs-12">
        <div class="col-lg-6 col-sm-7 col-xs-7">
        <h3>Gruppinlägg <span class="small">' . $loggedin . '</span></h3>
        <hr />';

        foreach ($this->comments as $value) {
            if ((int)$value->parentid > 0) {
                continue;
            }
            $html .= $this->getValHtml($value, $isadmin, $viewone);
        }
        
        $html .= '</div></div>';
        return $html;
    }
430880
public String prettyHtml() {
        StringBuilder html = new StringBuilder();
        for (Change aDiff : getChangeList()) {
            String text = aDiff.text.replace("&", "&amp;")
                                    .replace("<", "&lt;")
                                    .replace(">", "&gt;")
                                    .replace("\n", "&para;<br>");
            switch (aDiff.operation) {
                case INSERT:
                    html.append("<ins style=\"background:#e6ffe6;\">").append(text)
                        .append("</ins>");
                    break;
                case DELETE:
                    html.append("<del style=\"background:#ffe6e6;\">").append(text)
                        .append("</del>");
                    break;
                case EQUAL:
                    html.append("<span>").append(text).append("</span>");
                    break;
            }
        }
        return html.toString();
    }
1004106
public static String generatePageStartSimple(CmsWorkplace wp) {

        StringBuffer result = new StringBuffer(128);
        result.append("<html>\n<head>\n");
        result.append("<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=");
        result.append(wp.getEncoding());
        result.append("'>\n");
        result.append("<link rel='stylesheet' type='text/css' href='");
        result.append(wp.getStyleUri("workplace.css"));
        result.append("'>\n");
        result.append(generateCssStyle(wp.getCms()));
        result.append("</head>\n");
        result.append("<body style='background-color:/*begin-color Menu*/#f0f0f0/*end-color*/;'>\n");
        result.append("<div style='vertical-align:middle; height: 100%;'>\n");
        result.append("<table border='0' style='vertical-align:middle; height: 100%;'>\n");
        result.append("<tr><td width='40' align='center' valign='middle'><img name='report_img' src='");
        result.append(CmsWorkplace.getSkinUri());
        result.append("commons/wait.gif' width='32' height='32' alt=''></td>\n");
        result.append("<td valign='middle'>");
        return result.toString();
    }
627415
public String getJsp() {

        if (m_functionBean == null) {
            return "";
        }
        Format format = m_functionBean.getMainFormat();
        CmsDynamicFunctionFormatWrapper wrapper = new CmsDynamicFunctionFormatWrapper(m_cms, format);
        return wrapper.getJsp();
    }
258569
public static Function2<String, String, String> getFencedCodeBlockFormatter() {
		return (languageName, content) -> {
			/*final StringBuilder result = new StringBuilder();
			result.append("<div class=\\\"highlight"); //$NON-NLS-1$
			if (!Strings.isNullOrEmpty(languageName)) {
				result.append(" highlight-").append(languageName); //$NON-NLS-1$
			}
			result.append("\"><pre>\n").append(content).append("</pre></div>\n"); //$NON-NLS-1$ //$NON-NLS-2$
			return result.toString();*/
			return "```" + Strings.nullToEmpty(languageName).toLowerCase() + "\n" //$NON-NLS-1$ //$NON-NLS-2$
					+ content
					+ "```\n"; //$NON-NLS-1$
		};
	}
520118
public String htmlModules() {

        StringBuffer html = new StringBuffer(1024);
        Iterator<String> itModules = sortModules(getAvailableModules().values()).iterator();
        for (int i = 0; itModules.hasNext(); i++) {
            String moduleName = itModules.next();
            CmsModule module = getAvailableModules().get(moduleName);
            html.append(htmlModule(module, i));
        }
        return html.toString();
    }
391926
public static String stripHtml(String html) {

        if (html == null) {
            return null;
        }
        Element el = DOM.createDiv();
        el.setInnerHTML(html);
        return el.getInnerText();
    }
667124
public String getReturnCode() {

        CmsUUID ownId = CmsCoreProvider.get().getStructureId();
        CmsUUID detailId = m_data.getDetailId();
        if (detailId != null) {
            return "" + ownId + ":" + detailId;
        } else {
            return "" + ownId;
        }
    }