Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
retypos-adapter
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
CI / CD
CI / CD
Pipelines
Schedules
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
eterfund
retypos-adapter
Commits
9db7c1a4
Commit
9db7c1a4
authored
Sep 01, 2018
by
Георгий Попов
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix error with space character #13121
parent
39f6ad5b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
TyposClientInterface.php
src/TyposClientInterface.php
+4
-0
No files found.
src/TyposClientInterface.php
View file @
9db7c1a4
...
...
@@ -82,6 +82,10 @@ abstract class TyposClientInterface
// Strip all tags from text
$text
=
strip_tags
(
$article
->
text
);
// BUG# 13121
$typo
=
str_replace
(
"
\xc2\xa0
"
,
" "
,
$typo
);
$corrected
=
str_replace
(
"
\xc2\xa0
"
,
" "
,
$corrected
);
// Find all typos in text, capture an offset of each typo
$typos
=
[];
preg_match_all
(
"#
{
$typo
}
#"
,
$text
,
$typos
,
PREG_OFFSET_CAPTURE
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment