We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Proper way to scape string html_tag.php | Forum

UTAN
UTAN Apr 1 '16
Hi there,

So I had in metas

/ow_static/plugins/photo/css/photo_floatbox.css"


The escaping method is doing all this which doesn't look good and worst hits the SEO part of keyword meta and description..

Instead of using new Zend\Escaper\Escaper('utf-8'),

The method in your utility doing this mess is at html_tag.php document and the method name is escapeHtmlAttr for those that want to update it..
The Forum post is edited by UTAN Apr 1 '16
Vladimir Bach
Vladimir Bach Apr 1 '16
Umm, how exactly do we fix this? Your post is very confusing or missing something. 
UTAN
UTAN Apr 1 '16
I was in a hurry,

so in ow_utilities folder there is a file html_tag.php , look for method "method::escapeHtmlAttr" the you will see they are usinglike so:


return $escaper->escapeHtmlAttr($string)
so change that return for a know method from php like htmlentities() or something else..I think I will download another library and use instead..


The Forum post is edited by UTAN Apr 1 '16
ross Team
ross Apr 4 '16
Usage of this library for encoding special chars in urls or meta info does not affect SEO in any way. This was the first question we had before using this library. 
Vladimir Bach
Vladimir Bach Apr 4 '16
What about for the links inside the site. Everything looks terrible for those trying to share their groups, forums, etc. 



Descriptions are all wacky.. 

The Forum post is edited by Vladimir Bach Apr 4 '16
ross Team
ross Apr 4 '16
Yes, we are aware of that, this is newsfeed plugin issue. It will be fixed asap. 
Vladimir Bach
Vladimir Bach Apr 4 '16
This is in my wall area actually, not just the newsfeed, but it does do the same in the newsfeed.


-just fyi 

The Forum post is edited by Vladimir Bach Apr 4 '16
ross Team
ross Apr 4 '16
Any comment area have this
Vladimir Bach
Vladimir Bach Apr 4 '16
Correct
Quote from ross Any comment area have this

UTAN
UTAN Apr 4 '16
Quote from ross Usage of this library for encoding special chars in urls or meta info does not affect SEO in any way. This was the first question we had before using this library. 
Regardless looks unprofetional should be be fixed correcly..

  I will use a library and patch it myself..

 I won't touch the other methods because those are used by user input.

Thanks anyways.
Vladimir Bach
Vladimir Bach Apr 29 '16
Any News on fixing this issue? I find it annoying when members try to share a group or post in the newsfeed or on the site wall, and people can't clearly read the descriptions. 
ross Team
ross May 1 '16
This issue is fixed in the upcoming update which is within couple of weeks. 
Vladimir Bach
Vladimir Bach May 5 '16
Alright, thank you for letting me know.
Afsal Y
Afsal Y Sep 5 '16
In utitlities, escapeHtmlAttr this function was ignoring string "0" like... if ( !$string )

        {

            return;

        }



i changed it as is_null($string){

 return;

}


would this affect something else? please help me

ross Team
ross Sep 6 '16
We do not provide assistance with custom code modification. 

Create a post in the custom code modification section, probably some community member will asssit you with that.