Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Platform
Commits
3fd7f0ad
Commit
3fd7f0ad
authored
Jan 15, 2018
by
박관영
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for Issue #455
parent
a96dec08
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
1 deletion
+22
-1
helpers.php
Modules/Core/helpers.php
+21
-0
TaggableTrait.php
Modules/Tag/Traits/TaggableTrait.php
+1
-1
No files found.
Modules/Core/helpers.php
View file @
3fd7f0ad
...
@@ -54,3 +54,24 @@ if (! function_exists('asgard_editor')) {
...
@@ -54,3 +54,24 @@ if (! function_exists('asgard_editor')) {
return
view
(
'core::components.textarea-wrapper'
,
compact
(
'fieldName'
,
'labelName'
,
'content'
));
return
view
(
'core::components.textarea-wrapper'
,
compact
(
'fieldName'
,
'labelName'
,
'content'
));
}
}
}
}
if
(
!
function_exists
(
'utf8_slug'
))
{
function
utf8_slug
(
$title
,
$separator
=
'-'
)
{
// Convert all dashes/underscores into separator
$flip
=
$separator
==
'-'
?
'_'
:
'-'
;
$title
=
preg_replace
(
'!['
.
preg_quote
(
$flip
)
.
']+!u'
,
$separator
,
$title
);
// Replace @ with the word 'at'
$title
=
str_replace
(
'@'
,
$separator
.
'at'
.
$separator
,
$title
);
// Remove all characters that are not the separator, letters, numbers, or whitespace.
$title
=
preg_replace
(
'![^'
.
preg_quote
(
$separator
)
.
'\pL\pN\s]+!u'
,
''
,
mb_strtolower
(
$title
));
// Replace all separator characters and whitespace by a single separator
$title
=
preg_replace
(
'!['
.
preg_quote
(
$separator
)
.
'\s]+!u'
,
$separator
,
$title
);
return
trim
(
$title
,
$separator
);
}
}
Modules/Tag/Traits/TaggableTrait.php
View file @
3fd7f0ad
...
@@ -206,6 +206,6 @@ trait TaggableTrait
...
@@ -206,6 +206,6 @@ trait TaggableTrait
*/
*/
protected
function
generateTagSlug
(
$name
)
protected
function
generateTagSlug
(
$name
)
{
{
return
str
_slug
(
$name
);
return
utf8
_slug
(
$name
);
}
}
}
}
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