[prev in list] [next in list] [prev in thread] [next in thread]
List: mondrian
Subject: RE: [Mondrian] html Links in member ; MemberFormatter problem
From: "Julian Hyde" <jhyde () pentaho ! com>
Date: 2010-02-25 6:05:27
Message-ID: F9F6D58C57914771A52B0BA475CB35CA () mackerel
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Sorry, can't help. You'll have to figure that out.
_____
From: Fausto Zanasi [mailto:fausto.zanasi@gmail.com]
Sent: Wednesday, February 24, 2010 6:39 AM
To: jhyde@pentaho.com; Mondrian developer mailing list
Subject: Re: [Mondrian] html Links in member ; MemberFormatter problem
OK!, Thanks for answer...
Can you tell me where is JPivot (WCF) class/method i have to modify?
I am searching for "replace", "escape" ....
Fausto
2010/2/24 Julian Hyde <jhyde@pentaho.com>
There isn't a way that I know of. JPivot is doing the correct thing and
escaping everything safely for HTML to prevent HTML injection.
I suppose you could create a new property, say RAW_HTML. If it is true,
JPivot would output the formatted value without escaping for HTML. No
changes needed to Mondrian code, minor changes to the MDX of your reports,
and some code changes to JPivot.
Julian
_____
From: mondrian-bounces@pentaho.org [mailto:mondrian-bounces@pentaho.org] On
Behalf Of Fausto Zanasi
Sent: Tuesday, February 23, 2010 8:38 AM
To: mondrian@pentaho.org
Subject: [Mondrian] html Links in member ; MemberFormatter problem
Hi,
i am using Mondrina with jpivot.
my goal is a member value with a html link (tag <a href="...">).
I try to use
public class myLevelFormatter implements mondrian.olap.MemberFormatter {
public String formatMember(mondrian.olap.Member member) {
return "<a href=' ...'> foo...</a>";
}
}
It's working BUT the chars "<", ">" are translated in < ...
and the browser does not show a link but a string "<a href=' ...'>
foo...</a>".
Someone can me help ?
May be there is another way to obtain a table with links ?
Thanks
F.Zanasi
_______________________________________________
Mondrian mailing list
Mondrian@pentaho.org
http://lists.pentaho.org/mailman/listinfo/mondrian
[Attachment #5 (text/html)]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18882"></HEAD>
<BODY>
<DIV><SPAN class=310332301-25022010><FONT color=#000080 size=2
face="Lucida Sans">Sorry, can't help. You'll have to figure that
out.</FONT></SPAN></DIV><BR>
<BLOCKQUOTE
style="BORDER-LEFT: #000080 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; \
MARGIN-RIGHT: 0px" dir=ltr>
<DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B> Fausto Zanasi
[mailto:fausto.zanasi@gmail.com] <BR><B>Sent:</B> Wednesday, February 24, 2010
6:39 AM<BR><B>To:</B> jhyde@pentaho.com; Mondrian developer mailing
list<BR><B>Subject:</B> Re: [Mondrian] html Links in member ; MemberFormatter
problem<BR></FONT><BR></DIV>
<DIV></DIV>OK!, Thanks for answer...
<DIV>Can you tell me where is JPivot (WCF) class/method i have to
modify?</DIV>
<DIV>I am searching for "replace", "escape" ....</DIV>
<DIV><BR></DIV>
<DIV>Fausto</DIV>
<DIV><BR></DIV>
<DIV><BR><BR>
<DIV class=gmail_quote>2010/2/24 Julian Hyde <SPAN dir=ltr><<A
href="mailto:jhyde@pentaho.com">jhyde@pentaho.com</A>></SPAN><BR>
<BLOCKQUOTE
style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex"
class=gmail_quote>
<DIV>
<DIV><SPAN><FONT color=#000080 size=2 face="Lucida Sans">There isn't a way
that I know of. JPivot is doing the correct thing and escaping everything
safely for HTML to prevent HTML injection.</FONT></SPAN></DIV>
<DIV><SPAN><FONT color=#000080 size=2
face="Lucida Sans"></FONT></SPAN> </DIV>
<DIV><SPAN><FONT color=#000080 size=2 face="Lucida Sans">I suppose you could
create a new property, say RAW_HTML. If it is true, JPivot would output the
formatted value without escaping for HTML. No changes needed to Mondrian
code, minor changes to the MDX of your reports, and some code changes to
JPivot.</FONT></SPAN></DIV>
<DIV><SPAN><FONT color=#000080 size=2
face="Lucida Sans"></FONT></SPAN> </DIV>
<DIV><SPAN><FONT color=#000080 size=2
face="Lucida Sans">Julian</FONT></SPAN></DIV><BR>
<BLOCKQUOTE
style="BORDER-LEFT: #000080 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; \
MARGIN-RIGHT: 0px" dir=ltr>
<DIV dir=ltr lang=en-us align=left>
<HR>
<FONT size=2 face=Tahoma><B>From:</B> <A
href="mailto:mondrian-bounces@pentaho.org"
target=_blank>mondrian-bounces@pentaho.org</A> [mailto:<A
href="mailto:mondrian-bounces@pentaho.org"
target=_blank>mondrian-bounces@pentaho.org</A>] <B>On Behalf Of </B>Fausto
Zanasi<BR><B>Sent:</B> Tuesday, February 23, 2010 8:38 AM<BR><B>To:</B> <A
href="mailto:mondrian@pentaho.org"
target=_blank>mondrian@pentaho.org</A><BR><B>Subject:</B> [Mondrian] html
Links in member ; MemberFormatter problem<BR></FONT><BR></DIV>
<DIV>
<DIV></DIV>
<DIV class=h5>
<DIV></DIV><SPAN
style="BORDER-COLLAPSE: collapse; FONT-FAMILY: arial, sans-serif; FONT-SIZE: \
13px">Hi,
<DIV>i am using Mondrina with jpivot.<BR>
<DIV>my goal is a member value with a html link (tag <a
href="...">).</DIV>
<DIV>I try to use </DIV>
<DIV><BR></DIV>
<DIV>
<DIV>public class myLevelFormatter implements
mondrian.olap.MemberFormatter {</DIV>
<DIV> public String formatMember(mondrian.olap.Member
member) {</DIV>
<DIV><SPAN style="WHITE-SPACE: pre"></SPAN>return "<a href=' ...'>
foo...</a>";</DIV>
<DIV> }</DIV>
<DIV>}</DIV></DIV>
<DIV><BR></DIV>
<DIV>It's working BUT the chars "<", ">" are translated in &lt;
...</DIV>
<DIV>and the browser does not show a link but a string "<a href='
...'> foo...</a>".</DIV>
<DIV><BR></DIV>
<DIV>Someone can me help ?</DIV>
<DIV>May be there is another way to obtain a table with links ?</DIV>
<DIV><BR></DIV>
<DIV>Thanks</DIV>
<DIV>F.Zanasi</DIV></DIV></SPAN></DIV></DIV></BLOCKQUOTE></DIV><BR>_______________________________________________<BR>Mondrian \
mailing list<BR><A
href="mailto:Mondrian@pentaho.org">Mondrian@pentaho.org</A><BR><A
href="http://lists.pentaho.org/mailman/listinfo/mondrian"
target=_blank>http://lists.pentaho.org/mailman/listinfo/mondrian</A><BR><BR></BLOCKQUOTE></DIV><BR></DIV></BLOCKQUOTE></BODY></HTML>
_______________________________________________
Mondrian mailing list
Mondrian@pentaho.org
http://lists.pentaho.org/mailman/listinfo/mondrian
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic