<div dir="ltr">Otto, I agree, but if it is something that is outside the Theme's control, shouldn't it be incumbent upon core (which provides the related filter) to escape the output?</div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Wed, Jun 19, 2013 at 3:22 PM, Otto <span dir="ltr"><<a href="mailto:otto@ottodestruct.com" target="_blank">otto@ottodestruct.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I would not say that it is required, but it doesn't hurt.<br>
<br>
Thing about functions like home_url and such is that their output can<br>
be manipulated via plugins or other code. So it's possible that it<br>
could return something unexpected, in which case escaping it properly<br>
makes sense.<br>
<br>
When in doubt, escape.<br>
<span class="HOEnZb"><font color="#888888"><br>
-Otto<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
On Wed, Jun 19, 2013 at 2:19 PM, Stephen Cui <<a href="mailto:scui2005@gmail.com">scui2005@gmail.com</a>> wrote:<br>
> Thanks Cais for the clarification.<br>
><br>
> To be honest, this is something bother me for a while. I believe esc_url is<br>
> not required for home_url(). However, many reviewers make it required issue.<br>
><br>
><br>
> Zhijian (Stephen) Cui<br>
> Cell: <a href="tel:%28609%29977-5089" value="+16099775089">(609)977-5089</a><br>
> eMail: <a href="mailto:scui2005@gmail.com">scui2005@gmail.com</a><br>
><br>
><br>
> On Wed, Jun 19, 2013 at 2:13 PM, Edward Caissie <<a href="mailto:edward.caissie@gmail.com">edward.caissie@gmail.com</a>><br>
> wrote:<br>
>><br>
>> I don't consider that a manipulation of the $path parameter; but, with<br>
>> something like the following, I would say yes ...<br>
>><br>
>> home_url( theme_new_path() );<br>
>> function theme_new_path() {<br>
>> $path = '/';<br>
>> return apply_filters( `theme_new_path_filter`, $path );<br>
>> }<br>
>><br>
>> Something like this would be a much better candidate to be escaped<br>
>> although I really am not seeing this in a use case scenario just some random<br>
>> (pseudo) code to clarify what I see as manipulating the $path parameter of<br>
>> the function.<br>
>><br>
>> Edward Caissie<br>
>> aka Cais.<br>
>><br>
>><br>
>> On Wed, Jun 19, 2013 at 2:55 PM, Stephen Cui <<a href="mailto:scui2005@gmail.com">scui2005@gmail.com</a>> wrote:<br>
>>><br>
>>> How about home_url( '/' ) ?<br>
>>><br>
>>><br>
>>><br>
>>> On Wed, Jun 19, 2013 at 1:52 PM, Edward Caissie<br>
>>> <<a href="mailto:edward.caissie@gmail.com">edward.caissie@gmail.com</a>> wrote:<br>
>>>><br>
>>>> If the theme is manipulating the $path parameter of the function, or<br>
>>>> attaching something to the `home_url` hook then I would say yes, otherwise<br>
>>>> `home_url()` on its own should be fine as by default $path is empty.<br>
>>>><br>
>>>> Edward Caissie<br>
>>>> aka Cais.<br>
>>>><br>
>>>><br>
>>>> On Wed, Jun 19, 2013 at 2:39 PM, Stephen Cui <<a href="mailto:scui2005@gmail.com">scui2005@gmail.com</a>> wrote:<br>
>>>>><br>
>>>>> According to in example in<br>
>>>>> <a href="http://codex.wordpress.org/Theme_Review#Site_Information" target="_blank">http://codex.wordpress.org/Theme_Review#Site_Information</a>, echo home_url() is<br>
>>>>> acceptable (or not?)<br>
>>>>><br>
>>>>> But many reviewer ask the author to use echo esc_url( home_url() ).<br>
>>>>><br>
>>>>> Question: Is esc_url required in home_url() case?<br>
>>>>><br>
>>>>> Regards<br>
>>>>><br>
>>>>> Stephen<br>
>>>>><br>
>>>>><br>
>>>>> _______________________________________________<br>
>>>>> theme-reviewers mailing list<br>
>>>>> <a href="mailto:theme-reviewers@lists.wordpress.org">theme-reviewers@lists.wordpress.org</a><br>
>>>>> <a href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers" target="_blank">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a><br>
>>>>><br>
>>>><br>
>>>><br>
>>>> _______________________________________________<br>
>>>> theme-reviewers mailing list<br>
>>>> <a href="mailto:theme-reviewers@lists.wordpress.org">theme-reviewers@lists.wordpress.org</a><br>
>>>> <a href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers" target="_blank">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a><br>
>>>><br>
>>><br>
>>><br>
>>> _______________________________________________<br>
>>> theme-reviewers mailing list<br>
>>> <a href="mailto:theme-reviewers@lists.wordpress.org">theme-reviewers@lists.wordpress.org</a><br>
>>> <a href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers" target="_blank">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a><br>
>>><br>
>><br>
>><br>
>> _______________________________________________<br>
>> theme-reviewers mailing list<br>
>> <a href="mailto:theme-reviewers@lists.wordpress.org">theme-reviewers@lists.wordpress.org</a><br>
>> <a href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers" target="_blank">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a><br>
>><br>
><br>
><br>
> _______________________________________________<br>
> theme-reviewers mailing list<br>
> <a href="mailto:theme-reviewers@lists.wordpress.org">theme-reviewers@lists.wordpress.org</a><br>
> <a href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers" target="_blank">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a><br>
><br>
_______________________________________________<br>
theme-reviewers mailing list<br>
<a href="mailto:theme-reviewers@lists.wordpress.org">theme-reviewers@lists.wordpress.org</a><br>
<a href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers" target="_blank">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a><br>
</div></div></blockquote></div><br></div>