zenphoto forums » General Zenphoto Discussion

html_encode in printHomeLink, printParentBreadcrump

(10 posts)
  1. Wete

    Senior
    Joined: Jan '12
    Posts: 96

    Hi guys!

    You just added html_encode($before) ... in the functions printHomeLink, printParentBreadcrump and so on, which makes it no more possible to use sort of styles here (I used to use span). Any workaround besides hacking template-functions.php? (I know: "You should NEVER modify core files ...")

    Wete

    Posted 9 months ago #
  2. Zenphoto development team
    sbillard

    Chief Developer
    Joined: May '07
    Posts: 9,770

    Well, of course you can make your own functions to do these things. Use the current function as a model.

    We have regularized Zenphoto so that it is consistent. All strings used internally are presumed to need html encoding. This way nothing is left to chance. Strings which typically would contain html tags are encoded by a special function that scrubs invalid tags, encodes html entities, and passes valid tags through. This function is not invoked for strings that typically do not require html tagging since it is an expensive process.

    All this is so that hackers cannot sneek exploits into your site.

    Don't forget to read the Forum rules and usage resources
    Posted 9 months ago #
  3. Wete

    Senior
    Joined: Jan '12
    Posts: 96

    I completely understand that mentality, but I want those red >> in my breadcrumps. Maybe I'll use own functions for that, but I don't like those hacks, because they blast my knowledges ...

    Posted 9 months ago #
  4. Wete

    Senior
    Joined: Jan '12
    Posts: 96

    Solved it with 2 modified functions.

    Posted 9 months ago #
  5. Zenphoto development team
    acrylian

    Developer
    Joined: Jul '07
    Posts: 13,365

    The dev nightly build has some changes regarding this as well

    Don't forget to read the Forum rules and usage resources
    Posted 9 months ago #
  6. Wete

    Senior
    Joined: Jan '12
    Posts: 96

    A little more details ...?

    Posted 9 months ago #
  7. Zenphoto development team
    acrylian

    Developer
    Joined: Jul '07
    Posts: 13,365

    That generally parameters like before/after/between that a lot of functions work the same way and allow formatting. Of course this is the 1.4.4. dev nightly so probably not for production use yet.

    Don't forget to read the Forum rules and usage resources
    Posted 9 months ago #
  8. Wete

    Senior
    Joined: Jan '12
    Posts: 96

    Thanx!

    Posted 9 months ago #
  9. Zenphoto development team
    sbillard

    Chief Developer
    Joined: May '07
    Posts: 9,770

    More specifically, with the dev build there is a span class for each of the "before", "between", and "after" type parameters allowing you to use CSS formatting for their content.

    Don't forget to read the Forum rules and usage resources
    Posted 9 months ago #
  10. Wete

    Senior
    Joined: Jan '12
    Posts: 96

    Sounds good!

    Posted 9 months ago #

RSS feed for this topic

Reply

You must log in to post.