Page 1 of 1

Staus of URL's created in e.g. CMSModule::CreateReturnLink

Posted: Thu Jan 11, 2018 10:32 pm
by tomphantoo
Do any of you have experience with, and/or can you suggest a use-case for, CMSModule::CreateReturnLink() ?

I'm wondering because the method produces a string with an embedded URL which can be partially-'entitized' (not e.g. urlencoded). I think such anchor would (if actually modified) be unusable verbatim in a browser. Nor would the $onlyhref-returned URL be usable as-is.

Ditto for CMSModule::create_url().

Should we correct something here?

Re: Staus of URL's created in e.g. CMSModule::CreateReturnLi

Posted: Thu Jan 11, 2018 10:44 pm
by calguy1000
I would not use any PHP method for creating a 'link', and consider all of them to be 'legacy code'.

Bettter solution is to to give URL's to smarty and then build the link tag, or whatever else (javascript etc). in the template.

Whether the function is buggy or not is irrelevant. consider that the URL is your 'data' give it to smarty to render it as a link or whatever inside your template.