mirror of
https://github.com/danpros/htmly.git
synced 2026-04-23 05:56:22 +05:30
Format the image tag
This commit is contained in:
parent
697cfdfa11
commit
9d25d5e49d
1 changed files with 15 additions and 1 deletions
|
|
@ -115,7 +115,14 @@ function add_content($title, $tag, $url, $content, $user, $description = null, $
|
||||||
$post_tag = safe_tag(implode(',', $tag));
|
$post_tag = safe_tag(implode(',', $tag));
|
||||||
$post_tagmd = safe_html(implode(',', $tag));
|
$post_tagmd = safe_html(implode(',', $tag));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$media = explode(',', preg_replace("/\s*,\s*/", ",", rtrim($media, ',')));
|
||||||
|
$med = array();
|
||||||
|
foreach ($media as $m) {
|
||||||
|
$med[] = $m;
|
||||||
|
}
|
||||||
|
$media = implode(',', $med);
|
||||||
|
|
||||||
$post_date = date('Y-m-d-H-i-s');
|
$post_date = date('Y-m-d-H-i-s');
|
||||||
$post_title = safe_html($title);
|
$post_title = safe_html($title);
|
||||||
$post_media = preg_replace('/\s\s+/', ' ', strip_tags($media));
|
$post_media = preg_replace('/\s\s+/', ' ', strip_tags($media));
|
||||||
|
|
@ -249,6 +256,13 @@ function edit_content($title, $tag, $url, $content, $oldfile, $destination = nul
|
||||||
$post_tagmd = safe_html(implode(',', $tag));
|
$post_tagmd = safe_html(implode(',', $tag));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$media = explode(',', preg_replace("/\s*,\s*/", ",", rtrim($media, ',')));
|
||||||
|
$med = array();
|
||||||
|
foreach ($media as $m) {
|
||||||
|
$med[] = $m;
|
||||||
|
}
|
||||||
|
$media = implode(',', $med);
|
||||||
|
|
||||||
$oldurl = explode('_', $oldfile);
|
$oldurl = explode('_', $oldfile);
|
||||||
$dir = explode('/', $oldurl[0]);
|
$dir = explode('/', $oldurl[0]);
|
||||||
$olddate = date('Y-m-d-H-i-s', strtotime($date));
|
$olddate = date('Y-m-d-H-i-s', strtotime($date));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue