Commit graph

29 commits

Author SHA1 Message Date
Karthikeyan Singaravelan
3a146580a8 fix: Use html.unescape for Python 3.9 compatibility. 2020-11-26 13:30:58 +00:00
Shivam Mishra
edbb26d73e fix: display style removed from emails 2020-11-20 11:49:45 +05:30
Suraj Shetty
8150d65084 fix: Remove linkify to retain spaces in text-editor 2020-06-06 10:49:31 +05:30
Chinmay D. Pai
0caf571fa8
fix: do not sanitize if no html is found
return default string if no html tags are found

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-05-06 16:00:51 +05:30
Shivam Mishra
7651df7bed Merge branch 'develop' of github.com:frappe/frappe into field-strip-html 2020-04-13 14:04:22 +05:30
prssanna
8f3209c5e9 fix: fix HTMLParser import in unescape_html 2020-04-01 12:04:10 +05:30
prssanna
523f0a1f57 fix: strip html from fetched fields server side if required 2020-03-27 15:32:11 +05:30
dependabot[bot]
bdb77ba521
chore(deps): bump bleach from 2.1.4 to 3.1.2 (#9779)
* chore(deps): bump bleach from 2.1.4 to 3.1.2

Bumps [bleach](https://github.com/mozilla/bleach) from 2.1.4 to 3.1.2.
- [Release notes](https://github.com/mozilla/bleach/releases)
- [Changelog](https://github.com/mozilla/bleach/blob/master/CHANGES)
- [Commits](https://github.com/mozilla/bleach/compare/v2.1.4...v3.1.2)

Signed-off-by: dependabot[bot] <support@github.com>

* chore: use html.parser instead of html5lib

bleach no longer ships html5lib as a requirement and instead has
included it in the system. we can switch to using html.parser instead;
which is not an external dependency unlike html5lib.

source: https://github.com/mozilla/bleach/blob/master/CHANGES#L206

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>

* chore: use html5lib from bleach

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>

* chore: import html5lib from bleach._vendor

fixes issue where bs4 is unable to find html5lib in the tree:

bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: bleach._vendor.html5lib. Do you need to install a parser library?

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>

* chore: just give up and install html5lib as a dependency

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-03-25 00:20:57 +05:30
Faris Ansari
039113b741 fix: Whitelist schema.org attributes
so that they can be used in HTML Editor in web pages
2019-12-23 17:56:01 +05:30
Rohan Bansal
2d7c50cb5c fix: allow bold and underline tags while adding comment 2019-10-18 15:41:16 +05:30
Aditya Hase
a2e2f67f16
fix(login): ldap_settings not defined 2019-09-05 16:44:06 +05:30
Faris Ansari
6493463c89 fix: Blacklist iframe from sanitize_html (#7982) 2019-08-02 12:58:34 +05:30
Faris Ansari
7f24a3f71d fix: Show user fullname in mentions (#7592)
* fix: Show user fullname in mentions

* fix: Remove unused import

* fix: Update tests
2019-05-30 16:37:40 +05:30
Aditya Hase
837bfc0995 fix(unicode): Import unicode_literals in every file (#6805)
* fix(unicode): Import unicode_literals in every file

* fix(unicode): Test if safe_json_loads return unicode instead of bytes
2019-01-25 11:56:27 +05:30
Faris Ansari
338c4c8794 fix: Email Reply Chain
Previous email is appended to the next reply, but was not rendered by
splitting it with a hardcoded comment string. Since Quill does not
support comments, created a new HiddenBlock for it.
2018-11-07 13:06:22 +05:30
Faris Ansari
fe334d2c92 fix(Quill): Add all quill attributes that are required to render it 2018-11-05 17:07:21 +05:30
Faris Ansari
e0cf3f367b fix(Quill): Add data-row attr to whitelist
- data-row attribute is added by Quill for retaining table structure
2018-11-01 19:06:30 +05:30
Shreya
487fd3e321 Allow img src having data protocol 2018-10-03 10:52:24 +05:30
Faris Ansari
b629080184 fix(email html): Allow pre and code tags in email html (#5929) 2018-08-07 14:43:07 +05:30
Rushabh Mehta
aef1046b1f
[email] remove style from email so it does not mess up desk (#5860)
* [email] remove style from email so it does not mess up desk

* [fix] tests

* [fix] image parsing, #savedbyatestcase

* [fix] timeout issues in test

* [fix] timeout issues in test
2018-07-24 17:00:14 +05:30
Revant Nandgaonkar
bb0a2abdd5 [Fix] patch social login key refactor (#4749)
* [Fix] patch social login key refactor

* [Fix] import frappe in html_utils.py
2018-01-03 18:50:32 +05:30
Faris Ansari
6f4e2b046c
[fix] get_icon_html (#4748) 2018-01-03 18:07:38 +05:30
Revant Nandgaonkar
02aa7b6f41 Social login refactor (#4519)
* Added DocType Social Login Key

WIP for https://github.com/frappe/frappe/issues/4496
added basic fields
after_insert add provider_username and provider_userid fields on User dt
on_trash deletes added fields on User dt

* Added field to store fontawesome icon for provider

* [Patch] Social Login Keys to Social Login Key

* [Patch] Social Login Keys to Social Login Key

* Social Login Key generates boilerplate

* patch fixed for social_login_refactor

* removed patch-not working

* use social login keys to initiate flow

* Login page shows Social Login Key

* show login via if base_url present

* removed boilerplate generator

* Multiple Changes

fix zxcvbn import in password_strength.py
use of child table instead of additional fields on user dt to store username and userid

* Fetched Template on Client JS

* Frappe social login template working

* Added Social Login Key Templates

* Codacy fixes and validate social login key urls

* [Patch] Social Login Keys (untested)

* [Fix] Patch refactor social login keys

* [Fix] Patch refactor_social_login_keys manually tested

* Refactor OAuth 2.0 related changes for Social Login Key

* [Fix] Patch refactor social login keys

* Test - Adding Frappe Social Login Key

* Social Login Key Tests

check added child table entry on user for provider frappe
it also checks if userid is created

* [WIP] Office 365 Social Login Key Template

* [Fix] Social Login - Redirect URL

* [Test] Single sign-on icons for added provider

* [Fix] Codacy Errors

* [Fix] Social Login Key Form JS

* Docs Added for Social Login Key

* [Fix] Patch Refactor Social Login Keys

* Handle different icon types

Handle different icon types (image, icon, emoji) with just icon field

* Move the login methods to a new py file

frappe.integrations.oauth2_logins added
copied whitelisted guest oauth2 redirect endpoints from login.py
removing the functions from login.py will break backward compatibility

* Social Login Key Form Changes

Moved Enable field to top
Fields which are not editable are collapsed

* [Fix] Codacy Errors

* Corrected Docs, sync.py

* [Docs] Adding a social login provider

* [Fix] set frappe userid from User Social Login

* [Fix] frappe userid in oauth.py

* removed icon_type

* Use frappe.utils.is_image
2018-01-03 14:57:16 +05:30
Rushabh Mehta
0a6b637681 [fix] default email subject should be title 2017-09-29 10:05:47 +05:30
mbauskar
6b5b78b3cf [minor] fixed uneven intendation, replaced spaces with tag 2017-09-19 16:12:22 +05:30
Aditya Hase
ac6ed0d328 Fix bleach_whitelist import 2017-09-04 16:05:57 +05:30
Aditya Hase
769338f136 Replaced all instances of basestring with six.string_types 2017-08-11 00:10:11 +05:30
Rushabh Mehta
2e1d0fe71e [minor] html_utils.py, bleach.linkify remove tokenizer 2017-03-09 14:02:26 +05:30
Rushabh Mehta
8a83a9bfed [fix] fix html5lib compatibility issue 2017-03-09 13:20:40 +05:30