Results 1 to 4 of 4

Thread: Illegal characters for optional_description imagearray in Ultimate Fade-in slideshow?

  1. #1
    Join Date
    Jul 2005
    Posts
    39
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default Illegal characters for optional_description imagearray in Ultimate Fade-in slideshow?

    1) Script Title: Ultimate Fade-in slideshow (v2.4)

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...nslideshow.htm

    3) Describe problem: Are there any characters that should not be used in the "optional_description" element of the imagearray in the Ultimate Fade-in slideshow (v2.4)? Should the description text ideally be transformed by something like the htmlspecialchars or htmlentities functions in PHP?

  2. #2
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    1,933
    Thanks
    16
    Thanked 303 Times in 302 Posts
    Blog Entries
    9

    Default

    I haven't tried personally - I imagine that " (double quote) can't be used for obvious reasons, but I suppose the only sure way is to run a few tests with special characters, either by hardcoding or using htmlspecialchars/htmlentities, as you previously suggested.
    Focus on Function Web Design | Latest News RSS | Facebook | Twitter |
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps |
    The only limit to creativity is imagination: JemCon.org

  3. The Following User Says Thank You to Beverleyh For This Useful Post:

    nevdev (08-14-2013)

  4. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,926
    Thanks
    43
    Thanked 3,191 Times in 3,155 Posts
    Blog Entries
    12

    Default

    Just about anything that's allowed in ordinary HTML is fine there. Of course you cannot use " without escaping it. Many folks want to put HTML tags in there, and that's fine, but any " characters used inside the outer " characters need to be preceded with a slash:

    Code:
    \"
    What is also often done, if you want HTML in there, is change the outer " characters (aka: the delimiters) of the field to ' characters. Then you can have unescaped " inside the description field. But then any ' inside it would need the escape slash.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. The Following User Says Thank You to jscheuer1 For This Useful Post:

    nevdev (08-14-2013)

  6. #4
    Join Date
    Jul 2005
    Posts
    39
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Thank you, Beverley and John, for those tips. I ended up outputting the text from a prior
    Code:
    htmlentities($str, ENT_QUOTES);
    . Then I threw every bad character I could think of at it and everything survived.

    For me, the important HTML link is the image itself, but if I ever do decide to use HTML in the text I'll take out the htmlentities() transformation and just escape the quotes as advised.

    Many thanks.

Similar Threads

  1. Ultimate Fade-in slideshow (v2.4) - fade description text
    By kwakker35 in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 02-06-2012, 03:13 PM
  2. Replies: 10
    Last Post: 11-04-2010, 06:19 PM
  3. Replies: 3
    Last Post: 07-12-2010, 04:04 PM
  4. ultimate fade-in imagearray passing
    By Ike in forum Dynamic Drive scripts help
    Replies: 9
    Last Post: 11-18-2009, 02:47 PM
  5. Ultimate fade-in slideshow - fade-in time change
    By TheJoe in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 08-06-2009, 04:51 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •