Reports: Formatting unreliable - often HTML tags displayed instead !
I just generated a report of my entire library (of my current project): ~ 212 citations (plus attachments & notes).
Trouble is:
the formatting seems to be mostly _un_supported, and instead of correct formatting I get my notes interspersed with html code displayed...
Tried in FF & Chromium: same result.
Since I've made extensive use of formatting in my notes, and I've used Zotero's notes extensively, this amounts to nothing less than pain & disappointment...
Here's what most of my notes look like:
<ul>
<li> bla bla bla
<span style="text-decoration: underline;">
<em> another bla bla bla </em>
</span>.<br /><br />
Most of my notes have bullets & indents; however, some notes _are_ displayed correctly, but _why_ remains mysterious to me: those "correct" notes appear _randomly_ in the >200 page html document, and some of those do feature bullets, others don't.
What the?
Help & insights much appreciated :)
ps: also just had a look at the html source code (of that report) and could find no irregularity comparing notes where the formatting is (interpreted and) displayed correctly, and where it is _not_. Plz let me know if you need further details, thx!
Trouble is:
the formatting seems to be mostly _un_supported, and instead of correct formatting I get my notes interspersed with html code displayed...
Tried in FF & Chromium: same result.
Since I've made extensive use of formatting in my notes, and I've used Zotero's notes extensively, this amounts to nothing less than pain & disappointment...
Here's what most of my notes look like:
<ul>
<li> bla bla bla
<span style="text-decoration: underline;">
<em> another bla bla bla </em>
</span>.<br /><br />
Most of my notes have bullets & indents; however, some notes _are_ displayed correctly, but _why_ remains mysterious to me: those "correct" notes appear _randomly_ in the >200 page html document, and some of those do feature bullets, others don't.
What the?
Help & insights much appreciated :)
ps: also just had a look at the html source code (of that report) and could find no irregularity comparing notes where the formatting is (interpreted and) displayed correctly, and where it is _not_. Plz let me know if you need further details, thx!
(...)
<th>Date Added</th> <td>Wed
04 Apr 2012 10:39:25 CEST</td>
</tr> <tr> <th>Modified</th>
<td>Wed 04 Apr 2012
10:41:43 CEST</td> </tr>
</tbody></table><h3 class="tags">Tags:</h3> <ul class="tags">
<li>bla</li> <li>bliii</li> <li>bliasdv</li>
<li>bluuuuuuu</li> </ul> <h3 class="notes">Notes:</h3>
<ul class="notes"> <li
id="i301"> <p>bla bla</p> </li>
<li id="i395"> <p
class="plaintext"><ul> <li> bla blabla
blabla bla
(...)
where special emphasis ought to be placed on:
<p class="plaintext"><ul> <li> bla blabla
blabla bla
and narrowed down further still on:
<ul> <li>
or
&lt;ul&gt; &lt;li&gt;
instead of correctly _interpreting_ it as html in the form of
<ul> <li>
or
<ul> <li>
and displaying it in the browser (FF, etc) as a bog-standard bullet or bulletted list...
Perhaps
class="plaintext"
is the culprit? however, zapping it away with firebug didn't do the trick (yet)... who or what told z to render that note in bl***y plaintext?
So why are these html tags not encoded (?) properly??? And why only on every other note in my long report?
Any ideas?
http://forums.zotero.org/discussion/21333/html-formatting-shows-up-in-notes-in-generated-repors/
I'd even be happy to find a script to clean my "faulty" report, needn't be a zotero-internal fix.
Could even do a laborious find-n-replace routine, but would consider that close to worst-case............
<p> bla </p>
paragraph ?!?
<p>
tags (around the faulty stuff) in firebug on the fly and voilá: neatly formatted text displayed.so my hunch: obvious bug in zotero ?
<p>
tags, but still get faultiness displayed... feel I'm only scratching the surface... why did it work with firebug (for one paragraph)? what's the root cause?need help!
guess that means a quick-fix let alone a real sound solution is gonna take quite a while to come by....?
;-(
You can just click the HTML button in the note itself and copy the contents.
it took me a while, but now I found a neat work-around:
I modified http://www.htmlescape.net/htmlunescape_tool.html and let a local copy run the javascript to do the conversion (locally, without server interaction).
Did this on a version with the p & plaintext tags still in it, but it worked nonetheless.
Further, created a report from one of the many citations with faulty notes and also there the result was faulty (for a report with a single citation); hence, it's not down to the size of the report...
Still not quite sure what the trigger is, but am reasonably content to have found a 2-second solution...
Dan, clicking on the html-button (tinyMCE) of the faulty note produces clean html; so I don't know if that would help. If I find a faulty note which I'd be happy to share, I will.
<p>This note has two paragraphs, and the HTML tags show up in the report.</p>
<p>This is the second paragraph.</p>
I do hope the developers find the time to address this issue.
Also new notes, even added to newly created library items, have the problem as soon as I enter a new paragraph. This source code shows correctly:
<p>Test</p>
this source code shows with tags:
<p>Test</p>
<p>testnote</p>
Thanks for looking into it!
It's clearly a bug.
[FWIW, reverting this commit seems to do the trick, for me: https://github.com/zotero/zotero/commit/21bf3000cbe64ad5345bb731b0e8396aa004b13f ]
1. I don't know if I reverted the change correctly (downloaded the older version and manually replaced the report.js in zotero.jar/content/zotero/xpcom/), but it didn't work.
2. Then I installed the latest branch xpi (3.0.10.r11074) over the standard one, didn't help either, even after firefox and system reboot..
did I miss anything?
Though I am pretty sure (but not 100%!!)that even the example above didn't show right before update to branch version.
Well, problem found, but what to do with it? I want to have empty paragraphs ("& nbsp;") sometimes in my notes..
thanks again for your help!!
Thanks!