sealcode / sealious

An extensible, declarative node framework
25 stars 2 forks source link

Field type html #300

Closed kuba-orlik closed 8 years ago

kuba-orlik commented 8 years ago

I've added a simple html field-type that uses the sanitize-html module to remove any possible xss vulnerabilities. It supports two formats: safe and unsafe/original

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.2%) to 48.105% when pulling 0fd14f859d1a06cd4ecbd74113c0af92e013be29 on field_type_html into 1621f3d4addb350893154c20d3a09f558a4f950b on alpha.

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.2%) to 48.105% when pulling dcc06f9fc3103a2c308060b1125c8dfb4941bcc4 on field_type_html into c96df1512440ba559b2983768afd9950bca8a4fb on alpha.

kuba-orlik commented 8 years ago

The changes are documented in user-reference:

https://github.com/sealcode/sealious-user-reference/commit/b251ace2416cf1ae700df9acf4b1f1dd2a0aa194

coveralls commented 8 years ago

Coverage Status

Changes Unknown when pulling b84593306e2e85183ff863e80e67e40ceccc0aaa on field_type_html into \ on alpha**.

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.2%) to 47.964% when pulling 0c151175cb45ae2b9b510bf02d7f160f8aed260d on field_type_html into ad3b4e4484ac28eda1262bbb3957946a589fb71d on alpha.

adwydman commented 8 years ago

Problems with tests:

  1. git checkout field_type_html
  2. npm install - sanitize_html installs
  3. npm test, error:
$ npm test

> sealious@0.7.11 test C:\Users\anwi\Desktop\sealious
> mocha --recursive tests

module.js:442
    throw err;
    ^

Error: Cannot find module 'sanitize-html'
    at Function.Module._resolveFilename (module.js:440:15)
    at Function.Module._load (module.js:388:25)
    at Module.require (module.js:468:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (C:\Users\anwi\Desktop\sealious\lib\base-chips\field-types\html.js:1:84)
    at Module._compile (module.js:541:32)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:458:32)
    at tryModuleLoad (module.js:417:12)
    at Function.Module._load (module.js:409:3)
    at Module.require (module.js:468:17)
    at require (internal/module.js:20:19)
    at locreq (C:\Users\anwi\Desktop\sealious\node_modules\locreq\index.js:33:9)
    at curried (C:\Users\anwi\Desktop\sealious\node_modules\locreq\index.js:38:10)
    at Object.<anonymous> (C:\Users\anwi\Desktop\sealious\tests\unit-tests\base-chips\field-types\html.test.js:4:25)
    at Module._compile (module.js:541:32)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:458:32)
    at tryModuleLoad (module.js:417:12)
    at Function.Module._load (module.js:409:3)
    at Module.require (module.js:468:17)
    at require (internal/module.js:20:19)
    at C:\Users\anwi\Desktop\sealious\node_modules\mocha\lib\mocha.js:220:27
    at Array.forEach (native)
    at Mocha.loadFiles (C:\Users\anwi\Desktop\sealious\node_modules\mocha\lib\mocha.js:217:14)
    at Mocha.run (C:\Users\anwi\Desktop\sealious\node_modules\mocha\lib\mocha.js:485:10)
    at Object.<anonymous> (C:\Users\anwi\Desktop\sealious\node_modules\mocha\bin\_mocha:403:18)
    at Module._compile (module.js:541:32)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:458:32)
    at tryModuleLoad (module.js:417:12)
    at Function.Module._load (module.js:409:3)
    at Module.runMain (module.js:575:10)
    at run (node.js:348:7)
    at startup (node.js:140:9)
    at node.js:463:3
npm ERR! Test failed.  See above for more details.

I tried to install sanitize_html specifically, but the error stays the same.

kuba-orlik commented 8 years ago

That's very strange, as Travis does not seem to have this issue... I suspect it's something with your instance. Could you clone the repository to a different directory and try there?

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.2%) to 47.934% when pulling 3fd46a215471d1f42effbf58166c77ee7c5de448 on field_type_html into f5830cf70f1caa6a084e55c85bd0ab3f3666a352 on alpha.

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.2%) to 47.934% when pulling b243bd4f0385ce2f56febd402d2b32b2a88e9870 on field_type_html into 5e634e8d418b76ba27ae48975e96f7698c412f50 on alpha.

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.2%) to 47.905% when pulling 639421151be908a3f1495506d43dbdcec37c1c9d on field_type_html into 03d3a8be343c1bd802075d3c4e0086692b53a6b4 on alpha.

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.2%) to 47.847% when pulling 41f369d089534aca1bf46590bc29d9d9d5c91be9 on field_type_html into 0a5cded30e0694f7d907b6455bce8cffbc37ac6f on alpha.

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.2%) to 47.682% when pulling 9a62e1f378bd1553bab6f98f88c763517b038a5e on field_type_html into dada0293fcbc30fe2d5c2a91faaa66b914038661 on alpha.

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.2%) to 47.653% when pulling 99aff286c5c9927455c890cfaebb6c140aa1e203 on field_type_html into 46d43cbf7fd60114a4e64782c2ebc78739e22c41 on alpha.