Last modified: 2011-07-29 19:27:46 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T32090, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 30090 - escaped newlines in properties
escaped newlines in properties
Status: RESOLVED DUPLICATE of bug 29763
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
unspecified
PC Windows Server 2003
: Unprioritized major (vote)
: ---
Assigned To: Jeroen De Dauw
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-07-27 21:44 UTC by Brandon Plewe
Modified: 2011-07-29 19:27 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Brandon Plewe 2011-07-27 21:44:20 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.
Comment 1 Jeroen De Dauw 2011-07-27 22:48:12 UTC
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?
Comment 2 Brandon Plewe 2011-07-29 02:53:26 UTC
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.
Comment 3 Yaron Koren 2011-07-29 03:03:37 UTC
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)
Comment 4 Brandon Plewe 2011-07-29 03:21:20 UTC
It is PostgreSQL 8.3, encoding is UTF8
Comment 5 Brandon Plewe 2011-07-29 03:26:22 UTC
PostGreSQL 8.3.9, encoding UTF8, MW 1.16.1, SMW 1.5.6
Comment 6 Jeroen De Dauw 2011-07-29 15:27:35 UTC
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.
Comment 7 Brandon Plewe 2011-07-29 19:27:46 UTC
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 ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links