html 제거
동영상, 이미지 태그들 제거
1. <c:set value='${row.content.replaceAll("\\\<.*?\\\>","")}' var="rm" />
2.
<c:choose> <c:when test="${fn:length(rm) > 201}"> <c:out value="${fn:substring(rm,0,200)}" escapeXml="false" />.... </c:when> <c:otherwise> <c:out value="${rm}" escapeXml="false"/> </c:otherwise> </c:choose>
<div class="row"> <div class="row"> <div class="widget-content nopadding"> <div class="col-lg-12 text-center"> <div id="test-list"> <input type="text" class="search" id="search" style="display: none;"/> <ul class="list text-left"> <c:forEach items="${boardList }" var="row" varStatus="status"> <li> <div class="bs-callout bs-callout-info"> <h4 class="name"><a href="/users/board/community/read/${row.bno}">${row.rownum}. ${row.title}</a></h4> <p class="address" style="font-size: 16px;" onclick="moveRead('${row.bno}')"> <c:set value='${row.content.replaceAll("\\\<.*?\\\>","")}' var="rm" /> <c:choose> <c:when test="${fn:length(rm) > 201}"> <c:out value="${fn:substring(rm,0,200)}" escapeXml="false" />.... </c:when> <c:otherwise> <c:out value="${rm}" escapeXml="false"/> </c:otherwise> </c:choose> </p> <p style="float:right; color: #000000; font-size: 13px;"> ${row.name} <i class="item-icon fa fa-eye" style="color:green"></i> ${row.viewcnt} <c:if test="${row.replyCount >0}" > <i class="nav-icon fa fa-comments" style="color:orange"></i> ${row.replyCount} </c:if> <c:if test="${row.attachCount >0}" > <i class="nav-icon fa fa-paperclip" style="color:red"></i> ${row.attachCount} </c:if> <fmt:formatDate pattern="yyyy-MM-dd HH:mm" value="${row.regdate}" /> </p> </div> </li> </c:forEach>
댓글 ( 4)
댓글 남기기