Last modified: 2011-07-29 19:27:46 UTC
[SMW 1.5.6, MW 1.16.1, Semantic Forms 2.0.9] I have a text property, with some lengthy values (multiple paragraphs). They are formatted fine on the page with the property, but when that property is queried in another page, the results have every newline escaped as \012. Let's say I have a template definition that includes: [[description::{{{Description|}}}]] So if my page includes: Description=text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text it renders on the page as multiple paragraphs, but if Description is returned in an inline query, it looks like: text text text text text text text text text text\012\012text text text text text text text text text text text text\012\012text text text text text text text text text text text text Other wikitext works okay, unless it is dependent on newlines (e.g., bullets). It happens in any result format type. The properties browser also shows it escaped. It looks like this escaping happens when the template values are converted into properties; the template re-renders it fine, but queries don't.
I'll have a look at this. One way you can probably get around the issue is by using <br /> for newlines, instead of \012. Yaron, you familiar with this stuff or any suggestions/insights that might be helpful in fixing this?
If I put in HTML code like <br/> and <p> </p>, they are retained, and work in the query results. So, if I crammed all the text into one "paragraph" with <p> separating the real paragraphs, it would look right. However, that seems an unreasonable expectation.
I missed this whole thing until now. I assume that this weirdness is somehow due to the database... Brandon, what type of database are you using, including version number? And do you know what encoding it uses? (See here for how to find out, assuming it's MySQL - https://wincent.com/wiki/Finding_out_the_encoding_of_a_MySQL_database)
It is PostgreSQL 8.3, encoding is UTF8
PostGreSQL 8.3.9, encoding UTF8, MW 1.16.1, SMW 1.5.6
Oh, it's possible I fixed this issue 2 days ago then, see bug 29763. If you could try upgrade to SMW 1.6 and see if it's fixed there, that'd be neat.
Yes, the patch for buy 29763 worked perfectly. Not sure why that one didn't come up in my lengthy search for this problem. *** This bug has been marked as a duplicate of bug 29763 ***