htmlencode videourl
This commit is contained in:
@@ -7,7 +7,7 @@ use crate::util::time::parse_time_to_seconds;
|
|||||||
use crate::videos::{ServerOptions, VideoItem};
|
use crate::videos::{ServerOptions, VideoItem};
|
||||||
use async_trait::async_trait;
|
use async_trait::async_trait;
|
||||||
use error_chain::error_chain;
|
use error_chain::error_chain;
|
||||||
use htmlentity::entity::{ICodedDataTrait, decode};
|
use htmlentity::entity::{ICodedDataTrait, decode, encode, CharacterSet, EncodeType};
|
||||||
use std::sync::{Arc, RwLock};
|
use std::sync::{Arc, RwLock};
|
||||||
use std::{vec};
|
use std::{vec};
|
||||||
|
|
||||||
@@ -229,7 +229,11 @@ impl PmvhavenProvider {
|
|||||||
let video_item = VideoItem::new(
|
let video_item = VideoItem::new(
|
||||||
id,
|
id,
|
||||||
title,
|
title,
|
||||||
video_url.replace(" ", "%20").to_string(),
|
encode(
|
||||||
|
video_url.as_bytes(),
|
||||||
|
&EncodeType::NamedOrHex,
|
||||||
|
&CharacterSet::HtmlAndNonASCII
|
||||||
|
).to_string().unwrap_or(video_url.clone()),
|
||||||
"pmvhaven".to_string(),
|
"pmvhaven".to_string(),
|
||||||
thumb,
|
thumb,
|
||||||
duration as u32,
|
duration as u32,
|
||||||
|
|||||||
Reference in New Issue
Block a user