Support Forum
Hello,
I am working on the "custom profile fields" and I found a odd behaveur on the "text" fields.
1) Editing: the text displayed on the edit profile is html encoeded, i.e. on the textarea I have the <p>...</p> tags
2) Display: if I dont specify the userid on the sp_CustomProfileFieldsDisplay (i.e. the custom field is always "my own " data) the text displayed is correctly transformed to html (i.e. "\n" -> "<br/>"), if I specify the userId the text comes from without the html "translation"
I have tried to fix it myself, but I guess it is better if you look at it and fix in your code.
Here's the couple of thing sthat I came up with:
sp-custom-profile-fields-components.php line 95:
esc_html($text) should become sp_filter_text_edit($text)
sp-custom-profile-fileds-display-tag.php: I didn't find the "correct" way to pick up the html-ed field;
Thank you
nope, sorry. due to an annoying limit of 50 (which we plan to change) in the unread posts, I never saw this one...
interesting... you should see html in the input area since html is allowed, but it should not be encoded... your hint does look like a proper fix... will open a ticket to research in detail and get it fixed up...
Visit Cruise Talk Central and Mr Papa's World
corrections for this have been submitted to svn trunk... will be in next push update for RC, likely Sunday...
Visit Cruise Talk Central and Mr Papa's World
Hello,
I thought I could contribute to the bug tracker, but I guess I need to be authorization...
Anyway, thank you for the fix which is mostly working, however I have few notes:
- On sp-custom-profile-fields-display-tag.php: the sp_filter_text_display() is needed only for the get_usermeta(). $spThisUser->$fields['slug'] returns it already html-ed. Maybe it does not harm, but as a matter of principle...
- The include_once(CPFTAGSDIR.'sp-custom-profile-fileds-display-tag.php'); (line 101 on sp-custom-profile-fields-plugin.php) prevents it to be called twice. Either include(...) or make sp-custom-profile-fileds-display-tag.php a function.
- I was thinking of adding some little work on it, i.e. to be able to call a single function from the layout template to show all (of some) of the fields with the name / value and the divs so that it does not need to be done on the template. I am wondering if I could pass to you the suggestion, so that if you think it's worth having it you can include in your code.
Thank you,
Lorenzo
1 Guest(s)