Notification & Integrations refactoring (#346)
* Integrations Refactoring - WIP * integrations list & edit - WIP * Fix integration store binding issue * integrations refactor - WIP * Form integration - WIP * Form integration Edit - WIP * Integration Refactor - Slack - WIP * Integration Refactor - Discord - WIP * Integration Refactor - Webhook - WIP * Integration Refactor - Send Submission Confirmation - WIP * Integration Refactor - Backend handler - WIP * Form Integration Status field * Integration Refactor - Backend SubmissionConfirmation - WIP * IntegrationMigration Command * skip confirmation email test case * Small refactoring * FormIntegration status active/inactive * formIntegrationData to integrationData * Rename file name with Integration suffix for integration realted files * Loader on form integrations * WIP * form integration test case * WIP * Added Integration card - working on refactoring * change location for IntegrationCard and update package file * Form Integration Create/Edit in single Modal * Remove integration extra pages * crisp_help_page_slug for integration json * integration logic as collapse * UI improvements * WIP * Trying to debug vue devtools * WIP for integrations * getIntegrationHandler change namespace name * useForm for integration fields + validation structure * Integration Test case & apply validation rules * Apply useform changes to integration other files * validation rules for FormNotificationsMessageActions fields * Zapier integration as coming soon * Update FormCleaner * set default settings for confirmation integration * WIP * Finish validation for all integrations * Updated purify, added integration formatData * Fix testcase * Ran pint; working on integration errors * Handle integration events * command for Delete Old Integration Events * Display Past Events in Modal * on Integration event create with status error send email to form creator * Polish styling * Minor improvements * Finish badge and integration status * Fix tests and add an integration event test * Lint --------- Co-authored-by: Julien Nahum <julien@nahum.net>
This commit is contained in:
@@ -1,156 +1,133 @@
|
||||
<?php
|
||||
|
||||
use Stevebauman\Purify\Definitions\Html5Definition;
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Settings
|
||||
| Default Config
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The configuration settings array is passed directly to HTMLPurifier.
|
||||
|
|
||||
| Feel free to add / remove / customize these attributes as you wish.
|
||||
|
|
||||
| Documentation: http://htmlpurifier.org/live/configdoc/plain.html
|
||||
| This option defines the default config that is provided to HTMLPurifier.
|
||||
|
|
||||
*/
|
||||
|
||||
'settings' => [
|
||||
'default' => 'default',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Core.Encoding
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The encoding to convert input to.
|
||||
|
|
||||
| http://htmlpurifier.org/live/configdoc/plain.html#Core.Encoding
|
||||
|
|
||||
*/
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Config sets
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may configure various sets of configuration for differentiated use of HTMLPurifier.
|
||||
| A specific set of configuration can be applied by calling the "config($name)" method on
|
||||
| a Purify instance. Feel free to add/remove/customize these attributes as you wish.
|
||||
|
|
||||
| Documentation: http://htmlpurifier.org/live/configdoc/plain.html
|
||||
|
|
||||
| Core.Encoding The encoding to convert input to.
|
||||
| HTML.Doctype Doctype to use during filtering.
|
||||
| HTML.Allowed The allowed HTML Elements with their allowed attributes.
|
||||
| HTML.ForbiddenElements The forbidden HTML elements. Elements that are listed in this
|
||||
| string will be removed, however their content will remain.
|
||||
| CSS.AllowedProperties The Allowed CSS properties.
|
||||
| AutoFormat.AutoParagraph Newlines are converted in to paragraphs whenever possible.
|
||||
| AutoFormat.RemoveEmpty Remove empty elements that contribute no semantic information to the document.
|
||||
|
|
||||
*/
|
||||
|
||||
'Core.Encoding' => 'utf-8',
|
||||
'configs' => [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Core.SerializerPath
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The HTML purifier serializer cache path.
|
||||
|
|
||||
| http://htmlpurifier.org/live/configdoc/plain.html#Cache.SerializerPath
|
||||
|
|
||||
*/
|
||||
'default' => [
|
||||
'HTML.Allowed' => 'h1,h2,b,strong,i,em,a[href|title],ul,ol,li,p,br,span,*[style]',
|
||||
'HTML.ForbiddenElements' => '',
|
||||
'CSS.AllowedProperties' => 'font,font-size,font-weight,font-style,text-decoration,color,text-align',
|
||||
|
||||
// Purifier config cache disable to run on vapor (no tmp on lambda)
|
||||
'Cache.DefinitionImpl' => null,
|
||||
// 'Cache.SerializerPath' => storage_path('purify'),
|
||||
'AutoFormat.AutoParagraph' => false,
|
||||
'AutoFormat.RemoveEmpty' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| HTML.Doctype
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Doctype to use during filtering.
|
||||
|
|
||||
| http://htmlpurifier.org/live/configdoc/plain.html#HTML.Doctype
|
||||
|
|
||||
*/
|
||||
/*
|
||||
* Protect Links
|
||||
*/
|
||||
'HTML.Nofollow' => true,
|
||||
'HTML.TargetBlank' => true,
|
||||
'HTML.TargetNoreferrer' => true,
|
||||
'HTML.TargetNoopener' => true,
|
||||
|
||||
'HTML.Doctype' => 'XHTML 1.0 Strict',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| HTML.Allowed
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The allowed HTML Elements with their allowed attributes.
|
||||
|
|
||||
| http://htmlpurifier.org/live/configdoc/plain.html#HTML.Allowed
|
||||
|
|
||||
*/
|
||||
|
||||
'HTML.Allowed' => 'h1,h2,b,strong,i,em,a[href|title],ul,ol,li,p[style],br,span',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| HTML.ForbiddenElements
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The forbidden HTML elements. Elements that are listed in
|
||||
| this string will be removed, however their content will remain.
|
||||
|
|
||||
| For example if 'p' is inside the string, the string: '<p>Test</p>',
|
||||
|
|
||||
| Will be cleaned to: 'Test'
|
||||
|
|
||||
| http://htmlpurifier.org/live/configdoc/plain.html#HTML.ForbiddenElements
|
||||
|
|
||||
*/
|
||||
|
||||
'HTML.ForbiddenElements' => '',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| CSS.AllowedProperties
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The Allowed CSS properties.
|
||||
|
|
||||
| http://htmlpurifier.org/live/configdoc/plain.html#CSS.AllowedProperties
|
||||
|
|
||||
*/
|
||||
|
||||
'CSS.AllowedProperties' => 'font,font-size,font-weight,font-style,font-family,text-decoration,padding-left,color,background-color,text-align',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| AutoFormat.AutoParagraph
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The Allowed CSS properties.
|
||||
|
|
||||
| This directive turns on auto-paragraphing, where double
|
||||
| newlines are converted in to paragraphs whenever possible.
|
||||
|
|
||||
| http://htmlpurifier.org/live/configdoc/plain.html#AutoFormat.AutoParagraph
|
||||
|
|
||||
*/
|
||||
|
||||
'AutoFormat.AutoParagraph' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| AutoFormat.RemoveEmpty
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When enabled, HTML Purifier will attempt to remove empty
|
||||
| elements that contribute no semantic information to the document.
|
||||
|
|
||||
| http://htmlpurifier.org/live/configdoc/plain.html#AutoFormat.RemoveEmpty
|
||||
|
|
||||
*/
|
||||
|
||||
'AutoFormat.RemoveEmpty' => false,
|
||||
|
||||
/*
|
||||
* Protect Links
|
||||
*/
|
||||
'HTML.Nofollow' => true,
|
||||
'HTML.TargetBlank' => true,
|
||||
'HTML.TargetNoreferrer' => true,
|
||||
'HTML.TargetNoopener' => true,
|
||||
|
||||
/*
|
||||
* Allow notion link: allow Notion custom protocol
|
||||
*/
|
||||
'URI.AllowedSchemes' => [
|
||||
'http' => true,
|
||||
'https' => true,
|
||||
'mailto' => true,
|
||||
'tel' => true,
|
||||
'notion' => true,
|
||||
/*
|
||||
* Allow Notion links: allow Notion custom protocol
|
||||
*/
|
||||
'URI.AllowedSchemes' => [
|
||||
'http' => true,
|
||||
'https' => true,
|
||||
'mailto' => true,
|
||||
'tel' => true,
|
||||
'notion' => true,
|
||||
],
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| HTMLPurifier definitions
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify a class that augments the HTML definitions used by
|
||||
| HTMLPurifier. Additional HTML5 definitions are provided out of the box.
|
||||
| When specifying a custom class, make sure it implements the interface:
|
||||
|
|
||||
| \Stevebauman\Purify\Definitions\Definition
|
||||
|
|
||||
| Note that these definitions are applied to every Purifier instance.
|
||||
|
|
||||
| Documentation: http://htmlpurifier.org/docs/enduser-customize.html
|
||||
|
|
||||
*/
|
||||
|
||||
'definitions' => Html5Definition::class,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| HTMLPurifier CSS definitions
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify a class that augments the CSS definitions used by
|
||||
| HTMLPurifier. When specifying a custom class, make sure it implements
|
||||
| the interface:
|
||||
|
|
||||
| \Stevebauman\Purify\Definitions\CssDefinition
|
||||
|
|
||||
| Note that these definitions are applied to every Purifier instance.
|
||||
|
|
||||
| CSS should be extending $definition->info['css-attribute'] = values
|
||||
| See HTMLPurifier_CSSDefinition for further explanation
|
||||
|
|
||||
*/
|
||||
|
||||
'css-definitions' => null,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Serializer
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The storage implementation where HTMLPurifier can store its serializer files.
|
||||
| If the filesystem cache is in use, the path must be writable through the
|
||||
| storage disk by the web server, otherwise an exception will be thrown.
|
||||
|
|
||||
*/
|
||||
|
||||
'serializer' => [
|
||||
'driver' => env('CACHE_DRIVER', 'file'),
|
||||
'cache' => \Stevebauman\Purify\Cache\CacheDefinitionCache::class,
|
||||
],
|
||||
|
||||
// 'serializer' => [
|
||||
// 'disk' => env('FILESYSTEM_DISK', 'local'),
|
||||
// 'path' => 'purify',
|
||||
// 'cache' => \Stevebauman\Purify\Cache\FilesystemDefinitionCache::class,
|
||||
// ],
|
||||
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user