MrBiggZ Posted May 12, 2008 Share Posted May 12, 2008 Greetings! I did some searching on this and really didn't find anything. I'm really surprised nobody has gone in this territory. Here's my plight. I include some RSS feed(s) on a side bar of my website. I've been using the XHTML Transitional doc type. The code on my pages (to the best of my ability) is adhering to the XHTML Trans doc type. There are some feeds that I use that are not in XHTML but are in HTML. Thus making the validator fail. The other crazy thing I'm getting is where the vaildator is running into URL's that have &'s in them and it needs them in internet way (don't have the errors in front of me and it's the best I can describe it). I think the & is ;amp .. pretty sure. Is there a way to run script again the converted RSS feed once it's pulled in and correct the HTML code so it then valid XHTML? I appreciate the help .. really do. Just terribly terribly lost! Quote Link to comment Share on other sites More sharing options...
colombian Posted May 12, 2008 Share Posted May 12, 2008 Well, this is probably Regex territory. You need to determine what particular things are html. Maybe there is a set of 4 that do that. for & and other misc html things like that you can try the htmlentities function. With regular expressions you can find a string with a <br> tag and change it to <br /> and any other things of that nature. On another note - while it is good to follow coding practices (W3C recommendations) you shouldn't worry too much about it - 99% of your users don't know, care, etc. (This comes from someone who uses XHTML 1.1 (strict)) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.