Skip to content

Commit

Permalink
Merge pull request #275 from hizel/title-war-3
Browse files Browse the repository at this point in the history
замена двойного минуса слэшем в заголовке топиков и комментариев
  • Loading branch information
maxcom committed May 29, 2012
2 parents 9ca8c9d + 4d96bb5 commit c57bacd
Show file tree
Hide file tree
Showing 22 changed files with 157 additions and 32 deletions.
41 changes: 41 additions & 0 deletions src/main/java/ru/org/linux/site/tags/MakeTitleTag.java
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
* Copyright 1998-2012 Linux.org.ru
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/


package ru.org.linux.site.tags;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.tagext.BodyContent;
import javax.servlet.jsp.tagext.BodyTagSupport;
import java.io.IOException;

import static ru.org.linux.util.StringUtil.makeTitle;

/**
*/
public class MakeTitleTag extends BodyTagSupport {
public int doAfterBody() throws JspException {
try {
BodyContent bc = getBodyContent();
String body = bc.getString();
JspWriter out = bc.getEnclosingWriter();
out.print(makeTitle(body));
} catch (IOException e) {
throw new JspException("Error:" + e.getMessage());
}
return SKIP_BODY;
}
}
43 changes: 43 additions & 0 deletions src/main/java/ru/org/linux/site/tags/TitleTag.java
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* Copyright 1998-2012 Linux.org.ru
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package ru.org.linux.site.tags;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.tagext.BodyContent;
import javax.servlet.jsp.tagext.BodyTagSupport;

import java.io.IOException;

import static ru.org.linux.util.StringUtil.processTitle;

/**
*/
public class TitleTag extends BodyTagSupport {
public int doAfterBody() throws JspException {
try {
BodyContent bc = getBodyContent();
String body = bc.getString();
JspWriter out = bc.getEnclosingWriter();
if(body != null && !body.trim().isEmpty()) {
out.print(processTitle(body));
}
} catch (IOException e) {
throw new JspException("Error:" + e.getMessage());
}
return SKIP_BODY;
}
}
6 changes: 6 additions & 0 deletions src/main/java/ru/org/linux/util/StringUtil.java
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@


package ru.org.linux.util; package ru.org.linux.util;


import ru.org.linux.util.formatter.ToHtmlFormatter;

import java.math.BigInteger; import java.math.BigInteger;
import java.security.GeneralSecurityException; import java.security.GeneralSecurityException;
import java.security.MessageDigest; import java.security.MessageDigest;
Expand Down Expand Up @@ -54,6 +56,10 @@ public static boolean checkLoginName(String login) {
return loginCheckRE.matcher(login).matches(); return loginCheckRE.matcher(login).matches();
} }


public static String processTitle(String title) {
return title.replace(ToHtmlFormatter.MDASH_REGEX, ToHtmlFormatter.MDASH_REPLACE);
}

public static String makeTitle(String title) { public static String makeTitle(String title) {
if (title != null && !title.trim().isEmpty()) { if (title != null && !title.trim().isEmpty()) {
return title; return title;
Expand Down
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ public class ToHtmlFormatter {
/* /*
Замена двойного минуса на тире Замена двойного минуса на тире
*/ */
private static final String MDASH_REGEX = " -- "; public static final String MDASH_REGEX = " -- ";
private static final String MDASH_REPLACE = " — "; public static final String MDASH_REPLACE = " — ";


private Configuration configuration; private Configuration configuration;
private TopicDao messageDao; private TopicDao messageDao;
Expand Down
3 changes: 2 additions & 1 deletion src/main/webapp/WEB-INF/jsp/boxlets/gallery.jsp
Original file line number Original file line Diff line number Diff line change
@@ -1,6 +1,7 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="lor" uri="http://www.linux.org.ru" %> <%@ taglib prefix="lor" uri="http://www.linux.org.ru" %>
<%@ taglib prefix="l" uri="http://www.linux.org.ru" %>
<%-- <%--
~ Copyright 1998-2012 Linux.org.ru ~ Copyright 1998-2012 Linux.org.ru
~ Licensed under the Apache License, Version 2.0 (the "License"); ~ Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -28,7 +29,7 @@
<a href="${url}"> <a href="${url}">
<c:choose> <c:choose>
<c:when test="${not empty item.info}"> <c:when test="${not empty item.info}">
<img src="${item.icon}" alt="Скриншот: ${item.title}" ${item.info.code}> <img src="${item.icon}" alt="Скриншот: <l:title>${item.title}</l:title>" ${item.info.code}>
</c:when> </c:when>
<c:otherwise> <c:otherwise>
[bad image] <img src="${item.icon}" alt="Скриншот: ${item.title}"> [bad image] <img src="${item.icon}" alt="Скриншот: ${item.title}">
Expand Down
3 changes: 2 additions & 1 deletion src/main/webapp/WEB-INF/jsp/boxlets/top10.jsp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="lor" uri="http://www.linux.org.ru" %> <%@ taglib prefix="lor" uri="http://www.linux.org.ru" %>
<%@ taglib prefix="l" uri="http://www.linux.org.ru" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<h2>Top 10</h2> <h2>Top 10</h2>


Expand All @@ -28,7 +29,7 @@
<c:param name="lastmod" value="${message.lastmod.time}"/> <c:param name="lastmod" value="${message.lastmod.time}"/>
</c:if> </c:if>
</c:url> </c:url>
<a href="${fn:escapeXml(msg_link)}">${message.title}</a> <a href="${fn:escapeXml(msg_link)}"><l:title>${message.title}</l:title></a>
<c:if test="${message.pages gt 1}"> <c:if test="${message.pages gt 1}">
<c:url value="${message.url}/page${message.pages-1}" var="page_link"> <c:url value="${message.url}/page${message.pages-1}" var="page_link">
<c:param name="lastmod" value="${message.lastmod.time}"/> <c:param name="lastmod" value="${message.lastmod.time}"/>
Expand Down
3 changes: 2 additions & 1 deletion src/main/webapp/WEB-INF/jsp/comment-message.jsp
Original file line number Original file line Diff line number Diff line change
@@ -1,6 +1,7 @@
<%@ page contentType="text/html; charset=utf-8"%> <%@ page contentType="text/html; charset=utf-8"%>
<%@ page buffer="200kb"%> <%@ page buffer="200kb"%>
<%@ taglib tagdir="/WEB-INF/tags" prefix="lor" %> <%@ taglib tagdir="/WEB-INF/tags" prefix="lor" %>
<%@ taglib prefix="l" uri="http://www.linux.org.ru" %>
<%-- <%--
~ Copyright 1998-2012 Linux.org.ru ~ Copyright 1998-2012 Linux.org.ru
~ Licensed under the Apache License, Version 2.0 (the "License"); ~ Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -21,7 +22,7 @@


<jsp:include page="/WEB-INF/jsp/head.jsp"/> <jsp:include page="/WEB-INF/jsp/head.jsp"/>


<title>${add.topic.title} - ${preparedMessage.group.title} - ${preparedMessage.section.title}</title> <title><l:title>${add.topic.title}</l:title> - ${preparedMessage.group.title} - ${preparedMessage.section.title}</title>
<jsp:include page="/WEB-INF/jsp/header.jsp"/> <jsp:include page="/WEB-INF/jsp/header.jsp"/>
<div class=messages> <div class=messages>
<lor:message messageMenu="<%= null %>" preparedMessage="${preparedMessage}" message="${add.topic}" showMenu="false"/> <lor:message messageMenu="<%= null %>" preparedMessage="${preparedMessage}" message="${add.topic}" showMenu="false"/>
Expand Down
5 changes: 3 additions & 2 deletions src/main/webapp/WEB-INF/jsp/group.jsp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib tagdir="/WEB-INF/tags" prefix="lor" %> <%@ taglib tagdir="/WEB-INF/tags" prefix="lor" %>
<%@ taglib prefix="l" uri="http://www.linux.org.ru" %>
<%-- <%--
~ Copyright 1998-2012 Linux.org.ru ~ Copyright 1998-2012 Linux.org.ru
~ Licensed under the Apache License, Version 2.0 (the "License"); ~ Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -189,13 +190,13 @@


<c:if test="${firstPage and topic.pages<=1}"> <c:if test="${firstPage and topic.pages<=1}">
<a href="${group.url}${topic.msgid}?lastmod=${topic.lastmod.time}"> <a href="${group.url}${topic.msgid}?lastmod=${topic.lastmod.time}">
${topic_tags} ${topic.subj} ${topic_tags} <l:title>${topic.subj}</l:title>
</a> </a>
</c:if> </c:if>


<c:if test="${not firstPage or topic.pages>1}"> <c:if test="${not firstPage or topic.pages>1}">
<a href="${group.url}${topic.msgid}"> <a href="${group.url}${topic.msgid}">
${topic_tags} ${topic.subj} ${topic_tags} <l:title>${topic.subj}</l:title>
</a> </a>
</c:if> </c:if>


Expand Down
5 changes: 3 additions & 2 deletions src/main/webapp/WEB-INF/jsp/sameip.jsp
Original file line number Original file line Diff line number Diff line change
@@ -1,6 +1,7 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html; charset=utf-8"%> <%@ page contentType="text/html; charset=utf-8"%>
<%@ taglib tagdir="/WEB-INF/tags" prefix="lor" %> <%@ taglib tagdir="/WEB-INF/tags" prefix="lor" %>
<%@ taglib prefix="l" uri="http://www.linux.org.ru" %>
<%-- <%--
~ Copyright 1998-2012 Linux.org.ru ~ Copyright 1998-2012 Linux.org.ru
~ Licensed under the Apache License, Version 2.0 (the "License"); ~ Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -183,7 +184,7 @@ function checkCustomBan(idx) {
<c:if test="${topic.deleted}"> <c:if test="${topic.deleted}">
<s> <s>
</c:if> </c:if>
<a href="view-message.jsp?msgid=${topic.id}" rev=contents>${topic.title}</a> <a href="view-message.jsp?msgid=${topic.id}" rev=contents><l:title>${topic.title}</l:title></a>
<c:if test="${topic.deleted}"> <c:if test="${topic.deleted}">
</s> </s>
</c:if> </c:if>
Expand Down Expand Up @@ -211,7 +212,7 @@ function checkCustomBan(idx) {
<c:if test="${topic.deleted}"> <c:if test="${topic.deleted}">
<s> <s>
</c:if> </c:if>
<a href="jump-message.jsp?msgid=${topic.topicId}&amp;cid=${topic.id}" rev=contents>${topic.title}</a> <a href="jump-message.jsp?msgid=${topic.topicId}&amp;cid=${topic.id}" rev=contents><l:title>${topic.title}</l:title></a>
<c:if test="${topic.deleted}"> <c:if test="${topic.deleted}">
</s> </s>
</c:if> </c:if>
Expand Down
3 changes: 2 additions & 1 deletion src/main/webapp/WEB-INF/jsp/search.jsp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ page contentType="text/html; charset=utf-8"%> <%@ page contentType="text/html; charset=utf-8"%>
<%@ taglib tagdir="/WEB-INF/tags" prefix="lor" %> <%@ taglib tagdir="/WEB-INF/tags" prefix="lor" %>
<%@ taglib prefix="l" uri="http://www.linux.org.ru" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%-- <%--
~ Copyright 1998-2012 Linux.org.ru ~ Copyright 1998-2012 Linux.org.ru
Expand Down Expand Up @@ -109,7 +110,7 @@
<c:forEach items="${result}" var="item"> <c:forEach items="${result}" var="item">
<div class="msg"> <div class="msg">
<div class="msg_header"> <div class="msg_header">
<h2><a href="${item.url}"><c:out escapeXml="true" value="${item.title}"/></a></h2> <h2><a href="${item.url}"><l:title><c:out escapeXml="true" value="${item.title}"/></l:title></a></h2>
</div> </div>
<div class="msg_body"> <div class="msg_body">


Expand Down
1 change: 1 addition & 0 deletions src/main/webapp/WEB-INF/jsp/section-rss.jsp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<%@ page import="java.util.Date" buffer="200kb"%> <%@ page import="java.util.Date" buffer="200kb"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib tagdir="/WEB-INF/tags" prefix="lor" %> <%@ taglib tagdir="/WEB-INF/tags" prefix="lor" %>
<%@ taglib prefix="l" uri="http://www.linux.org.ru" %>
<rss version="2.0"> <rss version="2.0">
<channel> <channel>
<link>http://www.linux.org.ru/</link> <link>http://www.linux.org.ru/</link>
Expand Down
5 changes: 3 additions & 2 deletions src/main/webapp/WEB-INF/jsp/show-comments.jsp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<%@ taglib tagdir="/WEB-INF/tags" prefix="lor" %> <%@ taglib tagdir="/WEB-INF/tags" prefix="lor" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="l" uri="http://www.linux.org.ru" %>
<%-- <%--
~ Copyright 1998-2012 Linux.org.ru ~ Copyright 1998-2012 Linux.org.ru
~ Licensed under the Apache License, Version 2.0 (the "License"); ~ Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -56,7 +57,7 @@
<tr> <tr>
<td>${comment.sectionTitle}</td> <td>${comment.sectionTitle}</td>
<td>${comment.groupTitle}</td> <td>${comment.groupTitle}</td>
<td><a href="jump-message.jsp?msgid=${comment.topicId}&amp;cid=${comment.commentId}" rev=contents>${comment.title}</a></td> <td><a href="jump-message.jsp?msgid=${comment.topicId}&amp;cid=${comment.commentId}" rev=contents><l:title>${comment.title}</l:title></a></td>
<td><lor:dateinterval date="${comment.postdate}"/></td> <td><lor:dateinterval date="${comment.postdate}"/></td>
</c:forEach> </c:forEach>


Expand Down Expand Up @@ -98,7 +99,7 @@
<td>${item.ptitle}</td> <td>${item.ptitle}</td>
<td>${item.gtitle}</td> <td>${item.gtitle}</td>
<td> <td>
<a href="view-message.jsp?msgid=${item.msgid}" rev=contents>${item.title}</a> <a href="view-message.jsp?msgid=${item.msgid}" rev=contents><l:title>${item.title}</l:title></a>
</td> </td>
<td><c:out value="${item.reason}" escapeXml="true"/></td> <td><c:out value="${item.reason}" escapeXml="true"/></td>
<td> <td>
Expand Down
7 changes: 4 additions & 3 deletions src/main/webapp/WEB-INF/jsp/show-replies.jsp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib tagdir="/WEB-INF/tags" prefix="lor" %> <%@ taglib tagdir="/WEB-INF/tags" prefix="lor" %>
<%@ taglib prefix="l" uri="http://www.linux.org.ru" %>
<%--@elvariable id="topicsList" type="java.util.List<ru.org.linux.user.PreparedUserEvent>"--%> <%--@elvariable id="topicsList" type="java.util.List<ru.org.linux.user.PreparedUserEvent>"--%>
<%--@elvariable id="firstPage" type="Boolean"--%> <%--@elvariable id="firstPage" type="Boolean"--%>
<%--@elvariable id="nick" type="String"--%> <%--@elvariable id="nick" type="String"--%>
Expand Down Expand Up @@ -154,16 +155,16 @@
<td> <td>
<c:if test="${topic.event.type != 'DELETED'}"> <c:if test="${topic.event.type != 'DELETED'}">
<c:if test="${topic.event.cid>0}"> <c:if test="${topic.event.cid>0}">
<a href="jump-message.jsp?msgid=${topic.event.msgid}&amp;cid=${topic.event.cid}">${topic.event.subj}</a> <a href="jump-message.jsp?msgid=${topic.event.msgid}&amp;cid=${topic.event.cid}"><l:title>${topic.event.subj}</l:title></a>
</c:if> </c:if>
<c:if test="${topic.event.cid==0}"> <c:if test="${topic.event.cid==0}">
<a href="jump-message.jsp?msgid=${topic.event.msgid}">${topic.event.subj}</a> <a href="jump-message.jsp?msgid=${topic.event.msgid}"><l:title>${topic.event.subj}</l:title></a>
</c:if> </c:if>
(<a class="secondary" href="${topic.event.groupUrl}">${topic.event.groupTitle}</a>) (<a class="secondary" href="${topic.event.groupUrl}">${topic.event.groupTitle}</a>)
</c:if> </c:if>


<c:if test="${topic.event.type == 'DELETED'}"> <c:if test="${topic.event.type == 'DELETED'}">
<a href="view-message.jsp?msgid=${topic.event.msgid}">${topic.event.subj}</a> <a href="view-message.jsp?msgid=${topic.event.msgid}"><l:title>${topic.event.subj}</l:title></a>
(<a class="secondary" href="${topic.event.groupUrl}">${topic.event.groupTitle}</a>) (<a class="secondary" href="${topic.event.groupUrl}">${topic.event.groupTitle}</a>)
<br> <br>
<c:out value="${topic.event.eventMessage}" escapeXml="true"/> <c:out value="${topic.event.eventMessage}" escapeXml="true"/>
Expand Down
3 changes: 2 additions & 1 deletion src/main/webapp/WEB-INF/jsp/tracker.jsp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="ftm" uri="http://java.sun.com/jsp/jstl/fmt" %> <%@ taglib prefix="ftm" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="l" uri="http://www.linux.org.ru" %>


<% <%
String title = "Последние сообщения"; String title = "Последние сообщения";
Expand Down Expand Up @@ -100,7 +101,7 @@
<span class="tag">${tag}</span> <span class="tag">${tag}</span>
</c:forEach> </c:forEach>


${msg.title} <l:title>${msg.title}</l:title>
</a> </a>


(<%-- (<%--
Expand Down
17 changes: 9 additions & 8 deletions src/main/webapp/WEB-INF/jsp/view-message.jsp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<%@ page import="ru.org.linux.util.StringUtil" %> <%@ page import="ru.org.linux.util.StringUtil" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib prefix="l" uri="http://www.linux.org.ru" %>
<%@ taglib tagdir="/WEB-INF/tags" prefix="lor" %> <%@ taglib tagdir="/WEB-INF/tags" prefix="lor" %>
<%-- <%--
~ Copyright 1998-2012 Linux.org.ru ~ Copyright 1998-2012 Linux.org.ru
Expand Down Expand Up @@ -46,8 +47,8 @@
Topic nextMessage = (Topic) request.getAttribute("nextMessage"); Topic nextMessage = (Topic) request.getAttribute("nextMessage");
%> %>


<title>${message.title} - ${preparedMessage.group.title} - ${preparedMessage.section.title}</title> <title><l:title>${message.title}</l:title> - ${preparedMessage.group.title} - ${preparedMessage.section.title}</title>
<meta property="og:title" content="${message.title}" > <meta property="og:title" content="<l:title>${message.title}</l:title>" >


<c:if test="${preparedMessage.section.imagepost}"> <c:if test="${preparedMessage.section.imagepost}">
<meta property="og:image" content="${preparedMessage.image.mediumName}"> <meta property="og:image" content="${preparedMessage.image.mediumName}">
Expand All @@ -64,11 +65,11 @@
<link rel="canonical" href="${template.mainUrlNoSlash}<%= message.getLinkPage(npage) %>"> <link rel="canonical" href="${template.mainUrlNoSlash}<%= message.getLinkPage(npage) %>">


<c:if test="${prevMessage != null}"> <c:if test="${prevMessage != null}">
<link rel="Previous" id="PrevLink" href="${fn:escapeXml(prevMessage.link)}" title="<%= StringUtil.makeTitle(prevMessage.getTitle()) %>"> <link rel="Previous" id="PrevLink" href="${fn:escapeXml(prevMessage.link)}" title="<l:title><l:mkTitle>${prevMessage.title}</l:mkTitle></l:title>">
</c:if> </c:if>


<c:if test="${nextMessage != null}"> <c:if test="${nextMessage != null}">
<link rel="Next" id="NextLink" href="${fn:escapeXml(nextMessage.link)}" title="<%= StringUtil.makeTitle(nextMessage.getTitle()) %>"> <link rel="Next" id="NextLink" href="${fn:escapeXml(nextMessage.link)}" title="<l:title><l:mkTitle>${nextMessage.title}</l:mkTitle></l:title>">
</c:if> </c:if>


<c:if test="${not message.expired}"> <c:if test="${not message.expired}">
Expand Down Expand Up @@ -109,7 +110,7 @@
</td> </td>
<td align=left valign=top class="hideon-phone"> <td align=left valign=top class="hideon-phone">
<a href="${fn:escapeXml(prevMessage.link)}" rel=prev> <a href="${fn:escapeXml(prevMessage.link)}" rel=prev>
<%= StringUtil.makeTitle(prevMessage.getTitle()) %> <l:title><l:mkTitle>${prevMessage.title}</l:mkTitle></l:title>
</a> </a>
</td> </td>
</c:if> </c:if>
Expand All @@ -124,7 +125,7 @@
<tr valign=middle align=right> <tr valign=middle align=right>
<td class="hideon-phone"> <td class="hideon-phone">
<a href="${fn:escapeXml(nextMessage.link)}" rel=next> <a href="${fn:escapeXml(nextMessage.link)}" rel=next>
<%= StringUtil.makeTitle(nextMessage.getTitle()) %> <l:title><l:mkTitle>${nextMessage.title}</l:mkTitle></l:title>
</a> </a>
</td> </td>
<td align="right" valign="middle" style="padding-left: 5px"> <td align="right" valign="middle" style="padding-left: 5px">
Expand All @@ -148,7 +149,7 @@
</td> </td>
<td align=left valign=top class="hideon-phone"> <td align=left valign=top class="hideon-phone">
<a href="${fn:escapeXml(prevMessage.link)}" rel=prev> <a href="${fn:escapeXml(prevMessage.link)}" rel=prev>
<%= StringUtil.makeTitle(prevMessage.getTitle()) %> <l:title><l:mkTitle>${prevMessage.title}</l:mkTitle></l:title>
</a> </a>
</td> </td>
</c:if> </c:if>
Expand All @@ -167,7 +168,7 @@
<tr valign=middle align=right> <tr valign=middle align=right>
<td class="hideon-phone"> <td class="hideon-phone">
<a href="${fn:escapeXml(nextMessage.link)}" rel=next> <a href="${fn:escapeXml(nextMessage.link)}" rel=next>
<%= StringUtil.makeTitle(nextMessage.getTitle()) %> <l:title><l:mkTitle>${nextMessage.title}</l:mkTitle></l:title>
</a> </a>
</td> </td>
<td align="right" valign="middle" style="padding-left: 5px"> <td align="right" valign="middle" style="padding-left: 5px">
Expand Down
3 changes: 2 additions & 1 deletion src/main/webapp/WEB-INF/jsp/vote-vote.jsp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
~ limitations under the License. ~ limitations under the License.
--%> --%>
<%@ taglib tagdir="/WEB-INF/tags" prefix="lor" %> <%@ taglib tagdir="/WEB-INF/tags" prefix="lor" %>
<%@ taglib prefix="l" uri="http://www.linux.org.ru" %>
<%--@elvariable id="message" type="ru.org.linux.topic.Topic"--%> <%--@elvariable id="message" type="ru.org.linux.topic.Topic"--%>
<%--@elvariable id="poll" type="ru.org.linux.poll.Poll"--%> <%--@elvariable id="poll" type="ru.org.linux.poll.Poll"--%>


Expand All @@ -25,7 +26,7 @@


<H1>Голосование</H1> <H1>Голосование</H1>
<h2><a href="view-message.jsp?msgid=${poll.topicId}">Опрос</a></h2> <h2><a href="view-message.jsp?msgid=${poll.topicId}">Опрос</a></h2>
<h3><c:out value="${message.title}" escapeXml="true"/></h3> <h3><l:title><c:out value="${message.title}" escapeXml="true"/></l:title></h3>


<lor:poll-form poll="${poll}" enabled="true"/> <lor:poll-form poll="${poll}" enabled="true"/>


Expand Down
Loading

0 comments on commit c57bacd

Please sign in to comment.