[Building Sakai] html links in announcements and T&Q

Fischbein, Scott A. sfischbein at ucdavis.edu
Thu Feb 3 10:55:16 PST 2011


Karen and Steve - thanks for your help with this.

I tracked down the source of our problem - somehow, our "formattedtext.properties" file contained entries surrounded by quotes. So, for instance, we had: 

goodTags = "a,abbr,acronym,address,b,big,blockquote,br,center,cite..."

instead of 

goodTags = a,abbr,acronym,address,b,big,blockquote,br,center,cite...

So the parser was presumably including the quote along with the <a> and therefore not accepting <a> tags, but all the others were working.

I have no idea how we ended up with the quotes in there in the first place (we're running 2.7.0, and I double checked the Sakai SVN version and it doesn't contain the quotes), but now that they're removed, everything is working as expected.

Thanks again for the help.

Scott
UCD Vet Med Sakai Developer

-----Original Message-----
From: Steve Swinsburg [mailto:steve.swinsburg at gmail.com] 
Sent: Wednesday, February 02, 2011 2:55 PM
To: Brandt, Chris M.
Cc: Karen Tsao; vmsakai; Sakai Developers (sakai-dev at collab.sakaiproject.org)
Subject: Re: [Building Sakai] html links in announcements and T&Q

Hi Chris,

Announcements certainly does support HTML links, confirmed on the nightly trunk, what version Sakai are you using?

cheers,
Steve

On 03/02/2011, at 3:21 AM, Brandt, Chris M. wrote:

> Karen,
> 
> That's exactly what we're trying to do :)
> 
> If I include <a href="http://google.com" 
> target="_blank">google.com</a> (using either the link button or via 
> source) --
> 
> Upon saving in T&Q, it gets translated to &lt;a 
> target=&quot;_blank&quot; 
> href=&quot;http://google.com&quot;&gt;google.com&lt;/a&gt;
> 
> inside the question.
> 
> For Announcements, it just prevents the use of the a tag altogether with the red warning at the top.
> 
> Chris
> ____________
> 
> Chris Brandt, DVM, MS
> Instructional Media Development Specialist Computing and Technology 
> Services (CATS) UC Davis School of Veterinary Medicine 
> http://www.vetmed.ucdavis.edu
> (530) 754-4452
> 
> From: ktsao at hungs.org [mailto:ktsao at hungs.org] On Behalf Of Karen Tsao
> Sent: Tuesday, February 01, 2011 5:35 PM
> To: Brandt, Chris M.
> Cc: Sakai Developers (sakai-dev at collab.sakaiproject.org); vmsakai
> Subject: Re: [Building Sakai] html links in announcements and T&Q
> 
> Even with the translating, you should still be able to have links. Can I get more details about what you plan to do? Like where you want to insert a 'a' tag? If it's an FCK field, you can either use the Insert/Edit Link icon or just type something like <a href="http://google.com" target="_blank">google.com</a> under source mode.
> 
> Thanks,
> Karen
> On Tue, Feb 1, 2011 at 5:24 PM, Brandt, Chris M. <cmbrandt at ucdavis.edu> wrote:
> So is there no way to have a clickable link inside of a question?
> 
> Chris
> 
> On Feb 1, 2011, at 4:28 PM, "Karen Tsao" <ktsao at stanford.edu<mailto:ktsao at stanford.edu>> wrote:
> 
> Hi Chris,
> 
> The change is to prevent cross site scripting (XSS). We call some APIs from org.sakaiproject.util.FormattedText class to translate the input to html safe content.
> 
> Thanks,
> Karen
> On Tue, Feb 1, 2011 at 2:30 PM, Brandt, Chris M. <<mailto:cmbrandt at ucdavis.edu>cmbrandt at ucdavis.edu<mailto:cmbrandt at ucdavis.edu>> wrote:
> We had an issue awhile back where the announcement tool wouldn't allow any HTML content (br, ul, li, etc.).
> 
> We're having a similar issue again -- only this time it's preventing us from using the 'a' tag.
> 
> In Announcements, a warning error pops up -"Alert: The HTML tag '<a>' is not allowed in formatted text."
> 
> In T&Q, it just rewrites the content, translating it to html safe content.
> 
> We're not sure when this cropped up, but it was only reported to us recently.
> 
> Any suggestions?
> 
> Chris
> 
> ____________
> 
> Chris Brandt, DVM, MS
> Instructional Media Development Specialist Computing and Technology 
> Services (CATS) UC Davis School of Veterinary Medicine 
> <http://www.vetmed.ucdavis.edu>http://www.vetmed.ucdavis.edu
> (530) 754-4452
> 
> _______________________________________________
> sakai-dev mailing list
> <mailto:sakai-dev at collab.sakaiproject.org>sakai-dev at collab.sakaiprojec
> t.org<mailto:sakai-dev at collab.sakaiproject.org>
> <http://collab.sakaiproject.org/mailman/listinfo/sakai-dev>http://coll
> ab.sakaiproject.org/mailman/listinfo/sakai-dev
> 
> TO UNSUBSCRIBE: send email to <mailto:sakai-dev-unsubscribe at collab.sakaiproject.org> sakai-dev-unsubscribe at collab.sakaiproject.org<mailto:sakai-dev-unsubscribe at collab.sakaiproject.org> with a subject of "unsubscribe"
> 
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
> 
> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"



More information about the sakai-dev mailing list