Skip to content
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

Escape css id's and classes in templates #7332

Closed
TimDumol mannequin opened this issue Oct 28, 2009 · 10 comments
Closed

Escape css id's and classes in templates #7332

TimDumol mannequin opened this issue Oct 28, 2009 · 10 comments

Comments

@TimDumol
Copy link
Mannequin

TimDumol mannequin commented Oct 28, 2009

Currently, some css id's and classes have illegal values ('admin/0', for example, in worksheet_listing.html). This prevents jQuery and Selenium from accessing those attributes.

This adds a filter to produce legal values from those values.

CC: @williamstein @qed777

Component: notebook

Author: Tim Dumol

Reviewer: Mitesh Patel

Issue created by migration from https://trac.sagemath.org/ticket/7332

@TimDumol TimDumol mannequin added this to the sage-4.3 milestone Oct 28, 2009
@TimDumol TimDumol mannequin assigned boothby Oct 28, 2009
@TimDumol
Copy link
Mannequin Author

TimDumol mannequin commented Oct 28, 2009

Attachment: trac_7332-css-escape.patch.gz

Adds css_escape filter and makes worksheet_listing.html use it.

@TimDumol
Copy link
Mannequin Author

TimDumol mannequin commented Oct 28, 2009

Author: Tim Dumol

@TimDumol TimDumol mannequin added the s: needs review label Oct 28, 2009
@TimDumol
Copy link
Mannequin Author

TimDumol mannequin commented Oct 28, 2009

Fixed notebook_lib.js so that the checkboxes work after the patch.

@TimDumol
Copy link
Mannequin Author

TimDumol mannequin commented Oct 29, 2009

comment:2

Attachment: trac_7332-css-escape.2.patch.gz

Deepends on #7310.

@qed777
Copy link
Mannequin

qed777 mannequin commented Oct 31, 2009

Attachment: trac_7332-css-escape.3.patch.gz

Also fix the overall checkbox ("controlbox"). Apply only this patch.

@qed777
Copy link
Mannequin

qed777 mannequin commented Oct 31, 2009

comment:3

Version 3:

applying trac_7332-css-escape.2.patch
patching file sagenb/notebook/template.py
Hunk #1 FAILED at 15
Hunk #3 FAILED at 75
2 out of 3 hunks FAILED -- saving rejects to file sagenb/notebook/template.py.rej
patch failed, unable to continue (try -v)
patch failed, rejects left in working dir

but the failures were inconsequential.

  • Fixes the overall checkbox in notebook_lib.js.

To the extent it counts, my review is positive.

@qed777
Copy link
Mannequin

qed777 mannequin commented Oct 31, 2009

Reviewer: Mitesh Patel

@williamstein
Copy link
Contributor

comment:4

Looks good to me.

@qed777
Copy link
Mannequin

qed777 mannequin commented Jan 1, 2010

comment:6

On this sage-devel thread: I forgot to account for dots ('.') in login names. A quick fix: In sagenb/data/sage/js/notebook_lib.js's check_worksheet_filenames, replace

        id = worksheet_filenames[i].replace('/', '-');

with

        id = worksheet_filenames[i].replace(/[\/.]/g, '-');

I'll open a new ticket and add a patch, once I'm confident I haven't missed other special characters.

@qed777
Copy link
Mannequin

qed777 mannequin commented Jan 1, 2010

comment:7

See #7811.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants