Closed moui72 closed 7 years ago
This should now be fixed.
No go. See http://openlabdev.org/webwork-playground/#:problemId=local/ShiftingParabolas/shift-down.pg:questionId=11370 and screenshot below
Entered text included many linebreaks in both fields at various intertextual places
Do I need to bust my cache harder? Here's the script my browser is loading (I assume this is the relevant one)
Can you please share the exact text that you have entered, along with info about your OS/browser? It's possible that the issue is linebreak encoding, for which I may need more generous regular expressions. https://github.com/livinglab/webwork-for-wordpress/commit/1bdf3d614456712ed8b4cce8a4dd8d0913e051fe
The application JS is not the file that you've linked, though if you are seeing other improvements then I assume that an old cache is not the issue. (The issue is on the server anyway.)
Tested on macOS 10.12.5 (Sierra) with Chrome 59.0.3071.115 (Official Build) (64-bit)
Text:
I am responding to this thing
with
linebreaks!
The ¬
represents a new line character (\n
)
I just updated chrome to 60.0.3112.78 (Official Build) (64-bit)
with no change in behavior
Thank you for the details. Like so many other parts of this application, there are about a hundred text encoding steps that happen between WW and the server and WP and the browser. I've just put something in place on webwork-playground that addresses this specific post - can you play with it a bit and see if it matches what you'd expect?
seems to be working in the ask a question and the reply field, but not in the "what i've tried" field
text entered in all three fields
I am responding to this thing
with
linebreaks!
result
Whoops, I missed tried
. This should now be resolved.
the tried
issue is still working, but I think it's display only: when I edit a question with linebreaks in the tried
field, they are still there. notably, the question field will have \n
stripped out and replaced by <br />
but tried
still has \n
also, i wonder if it is worth the effort to reverse the effect for editing, so that users see line breaks instead of <br />
?
i can post screenshots later on, right now i dont have time sorry
A few corrections to the above, and screenshots: if I edit a question/reply immediately after posting it, the \n
characters are not replaced by <br />
but after a page refresh, they are.
tried
always has \n
(they are no longer stripped out) but never displays as line break or <br />
tried
behaviorDisplay
Immediate edit and edit after reload
Display
Immediate edit
Edit after reload
This issue is truly awful. I've done some work to try addressing the various problems:
\r
\n
variety) are now left unprocessed by the server; previously, I'd been converting them to <br />
in some cases, which was causing the Edit problemsOne side-effect is that text for some problems now appears to have more linebreaks than previously. See eg http://openlabdev.org/webwork-playground/#:problemId=local/CoordinatePlaneTrig/six-trig-point-q1.pg:questionId=11454. In truth, this is a more accurate representation of the markup as it's received from WW, though it does take up more vertical space than it seems like it ought to. I don't think there's much more we can do to "fix" this without retooling the WW-WP connection.
it's looking good now, sorry it's such a pain =\ I appreciate your commit message for 075442b 😆
@bree-z would you have a minute to verify that there are no lingering issues?
@moui72 yep, also on the list for tomorrow.
This looks OK to me in Firefox, but not Chrome. Linebreaks appear in Firefox for both questions and replies. In Chrome they don't appear for either. I'm using OSX 10.12.5, Firefox 54 and Chrome 60.0.3112.90.
See, for example:
After submitting:
@bree-z Thanks for the screenshots. It's looking OK to me, though I'm not near a Mac to check if that's the issue. Could you please triple-check that your cache is clean? shift-refresh
So sorry @boonebgorges ! I thought I'd cleared my cache, but maybe that was Firefox...or something else. (Too many browsers and windows and tabs for one week.)
It looks good now! I think we can close this.
Phew - I did not want to think about this issue anymore :-D
This looked like a rough one!
Yay! Thanks Bree
On Fri, Aug 11, 2017, 4:09 PM bree-z notifications@github.com wrote:
This looked like a rough one!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/livinglab/webwork-for-wordpress/issues/82#issuecomment-321907460, or mute the thread https://github.com/notifications/unsubscribe-auth/ADtKPGgnfikwE44Z3E2gvLA5pcFdEqvUks5sXLUIgaJpZM4Lvz6S .
when asking a question or making a reply, linebreaks are ignored outright
it might be nice to allow some for formatting purposes