Asset Publisher

An error occurred while processing the template.
Denied resolving class org.apache.velocity.tools.generic.EscapeTool by org.apache
1#set ($userLocalService = $serviceLocator.findService("com.liferay.portal.service.UserLocalService")) 
2 
3    #set($blogLocalService =  $serviceLocator.findService("com.liferay.portlet.blogs.service.BlogsEntryLocalService")) 
4     
5    #set ($domainName = $themeDisplay.getURLPortal() ) 
6    #set ($pageName = $themeDisplay.getURLCurrent() ) 
7    #set ($url = $domainName + $pageName) 
8    #set ($defaultBlogUrl = $domainName + "/blogTopics") 
9    #set ($allPostsUrl = "http://127.0.0.1/blogs/-/blogs/-/BlogTemplateTest/allPosts") 
10 
11    #set ($monthTitle = $pageName.replace("/", "")) 
12    #set ($monthTitle = $monthTitle.replace("-", " ")) 
13    #set ($firstLetter = $monthTitle.substring(0, 1).toUpperCase()) 
14    #set ($remaniningWord = $monthTitle.substring(1)) 
15    #set ($monthTitle = $firstLetter + $remaniningWord) 
16 
17     
18    #if (! $stringUtil.contains($pageName, "blogtopics", "/") ) 
19 
20            <header class="archive-header margin-bottom-20" style="box-sizing: border-box; margin: 0px 0px 20px; padding: 0px; border: 0px; font-variant-numeric: inherit; font-stretch: inherit; line-height: inherit; font-family: Arial, Helvetica, Arial, sans-serif; font-size: 13px; vertical-align: baseline; color: rgb(68, 68, 68);"> 
21            <h1 class="archive-title" style="font-family: Georgia,'Times New Roman',Times,serif;  font-size: 26px; line-height: 1.3em; margin-left: 30px; font-weight: normal;">Archive: <span style="box-sizing: border-box; margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">$monthTitle</span></h1> 
22            </header> 
23 
24 
25    #end 
26 
27 
28 
29 
30 
31    #if (!$entries.isEmpty()) 
32        #foreach ($curBlogEntry in $entries) 
33             
34            #set($blogE = $blogLocalService.getBlogsEntryByUuidAndGroupId($curBlogEntry.getClassUuid(),$curBlogEntry.getGroupId())) 
35             
36            #set ($user = $userLocalService.fetchUserById($getterUtil.getLong($curBlogEntry.getUserId()))) 
37            #set ($readMoreUrl = $domainName + "/blog/-/blogs/" + $blogE.getUrlTitle()  ) 
38            ##<h1><i>$curBlogEntry.title<i></h1>  | <h1>$curBlogEntry.UserName || $curBlogEntry.getCreateDate() </h1> | $curBlogEntry.content 
39 
40            <div class="entry approved"> 
41                <div class="entry-content"> 
42                <div style="margin-left: -30px;" class="post-header post-header-author clearfix"> 
43                    <div class="author-avatar row-fluid" style=""> 
44                        <div class="span3 img-container"> 
45			         		<img src=$user.getExpandoBridge().getAttribute("Profile Image Url") alt="" style="width:100%;height:auto;"> 
46			        	</div> 
47			        	 
48			        	<div class="span8 entry-header"> 
49					        <h1 class="entry-title margin-top-6"> 
50					            <a href=$readMoreUrl>$curBlogEntry.title</a> 
51					        </h1> 
52					        <p class="post-header-meta"> 
53					            
54                                #set($date = $curBlogEntry.getPublishDate()) 
55                                #set($dateString = $date.split($date," ")) 
56                 
57                                #set($date1 =  $dateUtil.getDate($date, "MMMM dd, yyyy", $locale))   
58                                #set($date2 = $dateUtil.getDate($date, "h:mm a", $locale)) 
59 
60					            <span class="font-bold"><a href=$user.getExpandoBridge().getAttribute("Blog Profile Url") rel="author"> $curBlogEntry.UserName </a></span>     
61					            <span>$date1</span> | 
62					            <span>$date2</span> 
63					             
64					        </p> 
65				        </div> 
66                    </div> 
67                </div> 
68            </div> 
69 
70            <div style="clear: both;"></div> 
71            <div class="entry-body"> 
72 
73                ##set ($groupIdLong = $curBlogEntry.getGroupId()) 
74                ##set ($articleIdLong = $curBlogEntry.getEntryId()) 
75 
76                #set ($content = $curBlogEntry.getSummary())     
77                #set ($readMoreUrl = $domainName + "/blog/-/blogs/" + $blogE.getUrlTitle()  ) 
78                #set($htmlContent = $escapeTool.html($content) ) 
79                 
80                $htmlUtil.unescape( $htmlContent ) 
81<br> 
82<a href=$readMoreUrl>Read More »</a> 
83            </div> 
84 
85            </div> 
86             
87   
88 
89            #end 
90     
91    #end