Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
blazy
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
blazy
Commits
e3ecf23d
Commit
e3ecf23d
authored
1 year ago
by
Gaus Surahman
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3427632
by Mortarion: Shortcode compatibility with CKeditor5
parent
e25f4e09
No related branches found
No related tags found
No related merge requests found
Pipeline
#119193
passed with warnings
1 year ago
Stage: build
Stage: validate
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CHANGELOG.txt
+4
-0
4 additions, 0 deletions
CHANGELOG.txt
src/Plugin/Filter/Shortcode.php
+12
-1
12 additions, 1 deletion
src/Plugin/Filter/Shortcode.php
src/Plugin/Filter/TextFilterBase.php
+2
-1
2 additions, 1 deletion
src/Plugin/Filter/TextFilterBase.php
with
18 additions
and
2 deletions
CHANGELOG.txt
+
4
−
0
View file @
e3ecf23d
Blazy 8.x-2.0-dev, 2024-03-14
------------------------------
- Issue #3427632 by Mortarion: Shortcode compatibility with CKeditor5.
Blazy 8.x-2.0-dev, 2024-03-09
------------------------------
- Issue #3424212: Performance issues with S3 (or other).
...
...
This diff is collapsed.
Click to expand it.
src/Plugin/Filter/Shortcode.php
+
12
−
1
View file @
e3ecf23d
...
...
@@ -33,9 +33,20 @@ class Shortcode {
// Might not be available with self-closing [TAG data="BLAH" /].
if
(
stristr
(
$string
,
"[
$item
"
)
!==
FALSE
)
{
$string
=
self
::
process
(
$string
,
$item
);
// @todo remove into self::replace().
$string
=
str_replace
(
"<p><
$item
"
,
"<
$item
"
,
$string
);
$string
=
str_replace
(
"<p><
$item
>
\n
"
,
"<
$item
>"
,
$string
);
$string
=
str_replace
(
"</
$item
></p>
\n
"
,
"</
$item
>
\n
"
,
$string
);
}
return
self
::
process
(
$string
,
$container
);
$text
=
self
::
process
(
$string
,
$container
);
// @todo remove into self::replace().
$text
=
str_replace
(
"<p><
$container
"
,
"<
$container
"
,
$text
);
$text
=
str_replace
(
"<p><
$container
>
\n
"
,
"<
$container
>
\n
"
,
$text
);
$text
=
str_replace
(
"</
$container
></p>
\n
"
,
"</
$container
>
\n
"
,
$text
);
return
$text
;
}
/**
...
...
This diff is collapsed.
Click to expand it.
src/Plugin/Filter/TextFilterBase.php
+
2
−
1
View file @
e3ecf23d
...
...
@@ -238,13 +238,14 @@ abstract class TextFilterBase extends FilterBase implements ContainerFactoryPlug
*
* See https://www.php.net/manual/en/class.domelement.php#101243
*/
protected
function
getHtml
(
\DOMElement
$node
)
:
?
string
{
protected
function
getHtml
(
$node
):
?string
{
$text
=
''
;
foreach
(
$node
->
childNodes
as
$child
)
{
if
(
$child
instanceof
\DOMElement
)
{
$text
.
=
$child
->
ownerDocument
->
saveXML
(
$child
);
}
}
return
$text
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment