-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Form text interpreted as code #19
Comments
Added ng-non-bindable to assignment text in assignments.django.html which prevents it from being interpreted by AngularJS. AceMarkdown needs to be fixed as well. Removed bleach as it was not in use.
This is an issue with AngularJS not ignoring expressions as it should. It is fixed by using ng-non-bindable. This can be added to the user pages that shows the assignments, but adding it to the admin pages where assignments are created might be a bit more difficult. I've raised an issue in cradmin-legacy about this which will hopefully solve the issue at its core rather than doing a big workaround. |
This issue should be solved when |
Is this still happening after the Django3.2 update? |
As far as I can tell there isn't any parse error, and saving an assignment with that as an assignment description renders the assignment correctly. However, the preview function seems to discard the text so I guess it still isn't fully fixed. |
Ended up with replacing the AceMarkdownWidget with a copy of DevilryCommentEditor. The bug is so ingrained inn how the AceMarkdownWidget is implemented inn cradmin that it is not easily fixable. Created a b14 release. |
@Levijatan: the create new assignment function ( |
Found that the AssignmentPreviewView expected an Assignment to already be saved to the db. So after fixing the AssignmentPreviewView not loading at all it started to crash the AssignmentCreateView and not actualy previewing the unsaved changes on the AssignmentUpdateView. So updated it use serialization and session storage to store the data for the preview instead of fetching it from the database. So now it actually previews changes and does not crash the create view. Created a b15 release. |
@Levijatan: the error is fixed, but there seems to be a rendering issue with the editor. Neither the assignment text or solution text are shown on the edit page. I'm however able to find their content among the elements ( |
@torgeirl it was missing the .js files. setup.py just didn't include them. Released b16 with the missing files. |
That solved it! 🎉 |
The following example was used in a task description form in Trix:
char [][] ordene ={{'H','A','B','D'}, {'M','V','Q','K'}, {'P','L','U','G'}, {'A','S','R','D'}};
Even with code tags, this leads to a parse error, see here.
The text was updated successfully, but these errors were encountered: