News module - problem and a workaround
Posted: Fri Jun 15, 2007 12:02 pm
I have tried a few times to get help with a problem with the News-module, without result. A \ is added before each " or ', and it seems to happen each time the news item is saved. (Edit the item, and you get a new \ added). This destroys every URL, as they will be like Site. I had almost given up using the News module for this reason.
The \ seems to be added when the news item is prepared for storage in the database. And it seems that the basic error is that text extracted from the database is parsed as plain html, not as php, smarty or anything like that. (Maybe php will work, but not smarty tags.) When the text is extracted from the database and put on the page, the \ does not work as an escape command.
Frustrated by this, I had decided to make my own news table in the database and include it with a user defined tag. But when I looked at the cms_module_news table in the database, I found that I could edit out the unwanted \ from the text in the database. I practice I write a dummy text in the news module, and then write the real text in a html editor and paste the html-formatted text into the relevant fields in the database. I cannot say that news are "Made Simple" this way, but it works. Now it is possible to write news with URLs, which is how I want to use this module. But I really hope that this will be fixed.
The \ seems to be added when the news item is prepared for storage in the database. And it seems that the basic error is that text extracted from the database is parsed as plain html, not as php, smarty or anything like that. (Maybe php will work, but not smarty tags.) When the text is extracted from the database and put on the page, the \ does not work as an escape command.
Frustrated by this, I had decided to make my own news table in the database and include it with a user defined tag. But when I looked at the cms_module_news table in the database, I found that I could edit out the unwanted \ from the text in the database. I practice I write a dummy text in the news module, and then write the real text in a html editor and paste the html-formatted text into the relevant fields in the database. I cannot say that news are "Made Simple" this way, but it works. Now it is possible to write news with URLs, which is how I want to use this module. But I really hope that this will be fixed.