If you write code that you know because of the data that it uses has the ability to generate libel about a famous figure on a public site, then you could be charged. The likelihood of being charged is much less than having written it yourself clearly and perhaps linking to the page and promoting it as valid news, but the possibility of being charged is there.