Skip to content
Projects
Groups
Snippets
Help
Sign in / Register
Toggle navigation
Minds Mobile
Project overview
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
193
Merge Requests
13
Security & Compliance
Packages
Wiki
Snippets
Members
Collapse sidebar
Close sidebar
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Minds
Minds Mobile
Compare Revisions
79d0fc78f699726b822570dae0f104f7cbdf9507...77bbd1139a35c7591a683c945a4cff25e8c77251
Source
77bbd1139a35c7591a683c945a4cff25e8c77251
...
Target
79d0fc78f699726b822570dae0f104f7cbdf9507
Compare
Commits (2)
(fix) use regexp with g flag in replace method
· 5ddd3726
Juan Manuel Solaro
authored
3 days ago
5ddd3726
Merge branch 'fix-html-replace-in-blog-view-html' into 'release/3.12.1'
· 77bbd113
Brian Hatchet
authored
49 minutes ago
Fix html replace in BlogViewHTML See merge request
!445
77bbd113
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
src/blogs/BlogViewHTML.js
View file @
77bbd113
...
...
@@ -153,9 +153,12 @@ export default class BlogViewHTML extends Component {
}
if
(
html
.
indexOf
(
'
<iframe
'
)
>=
0
)
{
html
=
html
.
replace
(
'
<iframe
'
,
'
<div class="iframewrapper"><iframe
'
);
html
=
html
.
replace
(
'
</iframe>
'
,
'
</iframe></div>
'
);
html
=
html
.
replace
(
'
src="//
'
,
'
src="https://
'
);
const
iframeOpen
=
new
RegExp
(
/
\<
iframe/g
);
const
iframeClose
=
new
RegExp
(
/
\<\/
iframe
\>
/g
);
const
badSrc
=
new
RegExp
(
/src=
\"\/\/
/g
);
html
=
html
.
replace
(
iframeOpen
,
'
<div class="iframewrapper"><iframe
'
);
html
=
html
.
replace
(
iframeClose
,
'
</iframe></div>
'
);
html
=
html
.
replace
(
badSrc
,
'
src="https://
'
);
}
return
`<!DOCTYPE html><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
...
...
This diff is collapsed.