ampersand problem with wordpress categories
Posted
by InnateDev
on Stack Overflow
See other posts from Stack Overflow
or by InnateDev
Published on 2010-05-01T11:59:13Z
Indexed on
2010/05/01
12:07 UTC
Read the original article
Hit count: 204
I have an array of categories, some with an & i.e. events & entertainment.
My script imports these categories and gets the ID of each using its name.
i.e.: $cat_id = array(get_cat_id($linearray[0]),get_cat_id($linearray[1]),get_cat_id($linearray[2]),get_cat_id($linearray[3]));
My script then adds a post to wp using these category ID's.
My problem is that categories from my import with the & are not imported.
These same categories (when an email notice is sent) break the email at the &.
Is there a simple workaround to this?
© Stack Overflow or respective owner