Open ba001 opened 7 years ago
I'll take a look
I'll walk you through my debugging steps:
One possibility was that the CSS files for the archive had changed, but weren't updated here. I fixed that by pointing the css links at www.blackarchive.org, this will make sure you always get the production css
Another possibility was that the xsl files had changed (which they had), so I updated those from the master branch of archive. This didn't fix the problem.
I used dev tools to compare the computed css values and found nothing.
I copied the html tei content from a working blake archive page, and put it on this page. It rendered correctly. So it wasn't the css.
I threw that html in a file, then copied the output of this page into a file and ran a diff on the 2 and found the problem.
if you look at index.html (of the master branch), you'll see {{ xml|safe }}
. xml is the the string it gets back after the tei transform. |safe means to render the return as html. But flask (the python library running the site) seems to have a bug. The "safe" output was adding additional </div>
tags. So everything is fine in the transform, it's when python renders the transform as html. In the archive, the transform is stored and angular renders it (which is why there isn't an error)
I did a brief google search, but didn't find anything useful. I know very little about python and flask, I threw this app together mainly copying code nathan had written.
The only hack I could come up with is using javascript to replace >
with >
and <
with <
. I also saw
was getting rendered as &#160;
.
This is not an ideal solution but that's all the time I can spend on this. You might come across other special characters that need to be replaced as well. The tiny js script is at the bottom of the index.html file.
Or perhaps there is an all python solution out there.
@queryluke luke, i'm struggling to fix a spacing issue in the transcription viewer.
have a look at the transcription here: http://www.blakearchive.org/copy/jerusalem.e?descId=jerusalem.e.illbk.77
put the XML below into the transcription test and notice the difference. lines are overlapping and the spacing of the first two lines, as one example, is off.
is there an easy fix here? unfortunately, our assistants at rochester can't work without the transcription tester.