Problem with Resource Token feature

33 views
Skip to first unread message

Diane

unread,
May 28, 2013, 2:00:18 PM5/28/13
to subjec...@googlegroups.com
Hi,
When I use the "Resource Token" feature in the "Editable boxes,"  it seems to strip all the html code from the description (e.g., bullets, links, etc.). Is there a way to keep the coding for the description with using the Resource Token? (This is in the new version)
 
Thanks,
Diane
 

Diane

unread,
May 28, 2013, 2:30:35 PM5/28/13
to subjec...@googlegroups.com
Hi,
On my WAMP server, it seems to resolve the issue if I take the "scrubData" off on line 303 of sp_Pluslet.php (see code below).  Is that ok to do?
 
Thanks,
Diane
 
   if ($override != "") {
                                            // show the subject-specific "description_override" if it exists
                                            $description = "<br />" . scrubData($override);
                                        } else {
                                            $description = "<br />" . scrubData($myrow[6]);
                                        }

Andrew Darby

unread,
May 28, 2013, 3:11:55 PM5/28/13
to subjec...@googlegroups.com
Hi Diane,

You probably shouldn't turn that off, since it makes sure the data is "clean."  Instead, add a second parameter of "richtext" to these; then it will let HTML through.  E.g.,

$description = "<br />" . scrubData($override, "richtext");

and

$description = "<br />" . scrubData($myrow[6], "richtext");

Thanks, that's a bug, we'll update the application. 

Andrew



--
You received this message because you are subscribed to the Google Groups "SubjectsPlus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to subjectsplus...@googlegroups.com.
To post to this group, send email to subjec...@googlegroups.com.
Visit this group at http://groups.google.com/group/subjectsplus?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Diane

unread,
May 29, 2013, 8:18:25 AM5/29/13
to subjec...@googlegroups.com
Thanks.

Also, I noticed that when I added bold to the token title, it was not showing up.

When I looked at the code from .9 version, this line 314 in sp_pluslet.php

$tokenized.= "<a href=\"$url\" target=\"_blank\">$fields[2]</a> $icons $description";

had "$fields[2]" instead of a row.

If I substituted the field, the title showed the change.

Is it ok to change to the "$fields[2] " ?

Diane

Andrew Darby

unread,
May 29, 2013, 8:55:45 AM5/29/13
to subjec...@googlegroups.com
Hi Diane,

Were you bolding the title by inserting html into the token, like,

{{dab},{25}, {<strong>America: History and Life</strong>},{11}}

If that's the case . . . well, I'm kind of surprised it works at all.  But, I don't see any harm in changing that around, although putting HTML inside the token code might break at some point in the future.  If you always wanted these titles to be bold, you could add some html to that $tokenized line, or else a css class to the anchor.



Diane

Diane

unread,
May 29, 2013, 9:53:21 AM5/29/13
to subjec...@googlegroups.com
Hi Andrew,
 
In the previous version, we were customizing the token titles, e.g. adding bold, etc.
 
It sounds like it might be best to not switch it to the Field.
 
Thanks,
Diane
Reply all
Reply to author
Forward
0 new messages