Commit Graph

12 Commits

Author SHA1 Message Date
Landon Wilkins a55623016d da licença part 47
add consistent license headers to all source files

Change-Id: I8d372efee113550ada3255f32ec6f1858e5520c4
Reviewed-on: https://gerrit.instructure.com/110152
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2017-04-28 17:59:55 +00:00
Aaron Cannon 8f48f69d06 A11y: Allow the insertion of MathML via the HTML editor
Fixes CNVS-28473

Test plan:
- Visit a page with an editor
- Switch to the HTML view.
- Insert MathML.
- Switch to and from the RCE editor and HTML editor.
- Verify that the MathML remains unchanged.
- Insure that it is not removed or otherwise redacted on save.

Change-Id: I46d55505518f0427fa342eff175a58bdcb0c5284
Reviewed-on: https://gerrit.instructure.com/79588
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Aaron Cannon <acannon@instructure.com>
QA-Review: Pierce Arner <pierce@instructure.com>
2016-06-27 15:30:37 +00:00
Cody Cutrer 9834937c8c don't autorequire a bunch of gems that are rarely used
Change-Id: I09ed3686629b62849d392684d587f30cb2047013
Reviewed-on: https://gerrit.instructure.com/51853
Tested-by: Jenkins
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-04-09 18:47:50 +00:00
Cody Cutrer 9407689be8 rspec 3-ify spec/lib
refs CNVS-16239

Change-Id: Id6d24bf80d8c5722b7ba613e566edafefb177b89
Reviewed-on: https://gerrit.instructure.com/42660
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Braden Anderson <braden@instructure.com>
Product-Review: Braden Anderson <braden@instructure.com>
QA-Review: Braden Anderson <braden@instructure.com>
2014-10-14 20:47:42 +00:00
Jeremy Stanley 6dbbd8d9f8 fix style-sanitizing regex
in commit 8ae4ba8e, the regex was modified to accept negative
values (e.g., -1.0em), making the \w-\w clause redundant and
causing extremely slow matching in certain pathological cases.

test plan:
 - import the Angel package attached to the ticket
 - it should complete in a reasonable time (a few minutes,
   probably) and definitely should not max out your CPU
   for three hours while making no visible progress

fixes CNVS-10820

Change-Id: I582386c25d4d99f362ce2411b0c387bc958a71c5
Reviewed-on: https://gerrit.instructure.com/30074
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
2014-02-14 16:41:56 +00:00
Raphael Weiner 91944495c2 convert sanitize field plugin into proper gem: CanvasSanitize
Change-Id: I5562a318bb3f52c1374a3a69f288bfb2381f8ee7
Reviewed-on: https://gerrit.instructure.com/29405
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Stephan Hagemann <stephan@pivotallabs.com>
Product-Review: Stephan Hagemann <stephan@pivotallabs.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
2014-01-28 22:36:18 +00:00
Justin Ball c4341bf636 Added spec for negative margin santize bug 2013-11-11 16:34:13 -07:00
James Williams 7d79140483 fully remove style tags in html sanitizer
test plan:
* test the sanitizer through the api by
creating or updating an object with html content
(such as a wiki page body attribute)

* the following html:
  <p><style>should ignore this text</style></p>

* should be sanitized to:
  <p></p>

fixes #CNVS-5828

Change-Id: I735f031eafdeeb8d7ae05fd977327fb3cc7e9251
Reviewed-on: https://gerrit.instructure.com/21689
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
2013-06-25 19:13:20 +00:00
Jeremy Stanley 9938feab15 whitelist <font> tags in sanitizer
fixes CNVS-4957

test plan:
 - import content containing <font> tags
   (such as the course attached to CNVS-4957)
 - these should survive the import process

note: the text in the course above won't actually appear in
hebrew unless you have the bwhebb.ttf font installed
but you can inspect the element and see that the <font> tags
are still there

Change-Id: Ifd219097b6a92813892669cb908d2e7c2d9dd4ca
Reviewed-on: https://gerrit.instructure.com/19712
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
2013-04-19 18:21:54 +00:00
Brian Palmer 77ca8ac013 remove deprecated rails constant usage
basically convert RAILS_ROOT -> Rails.root , RAILS_ENV -> Rails.env ,
RAILS_DEFAULT_LOGGER -> Rails.logger

This is necessary for rails 3

Change-Id: I138e1aa217fa8fb186d23ac09b04031c1e2b665e
Reviewed-on: https://gerrit.instructure.com/18412
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Eric Berry <ericb@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
2013-03-11 12:14:08 -06:00
Brian Palmer 51a12abb3e clean up and expand sanitize specs
This is in anticipation of upgrading to sanitize 2.x, so we can upgrade
nokogiri to 1.5.x

test plan: n/a

Change-Id: Ie59459dc2c4baeb48aca54b7ec30384239e06354
Reviewed-on: https://gerrit.instructure.com/7987
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2012-01-10 20:57:50 -07:00
Brian Whitmer 8b8173dcc9 Initial commit.
closes #6988138
2011-01-31 18:57:29 -07:00