import { join } from 'path'
import validator from 'validator'
import { toCompleteUUID } from '@server/helpers/custom-validators/misc'
+import { root } from '@shared/core-utils'
import { escapeHTML } from '@shared/core-utils/renderer'
+import { sha256 } from '@shared/extra-utils'
import { HTMLServerConfig } from '@shared/models'
import { buildFileLocale, getDefaultLocale, is18nLocale, POSSIBLE_LOCALES } from '../../shared/core-utils/i18n/i18n'
import { HttpStatusCode } from '../../shared/models/http/http-error-codes'
import { VideoPlaylistPrivacy, VideoPrivacy } from '../../shared/models/videos'
-import { isTestInstance, sha256 } from '../helpers/core-utils'
+import { isTestInstance } from '../helpers/core-utils'
import { logger } from '../helpers/logger'
-import { mdToPlainText } from '../helpers/markdown'
+import { mdToOneLinePlainText } from '../helpers/markdown'
import { CONFIG } from '../initializers/config'
import {
ACCEPT_HEADERS,
res.status(HttpStatusCode.NOT_FOUND_404)
return html
}
- const description = mdToPlainText(video.description)
+ const description = mdToOneLinePlainText(video.description)
let customHtml = ClientHtml.addTitleTag(html, video.name)
customHtml = ClientHtml.addDescriptionTag(customHtml, description)
return html
}
- const description = mdToPlainText(videoPlaylist.description)
+ const description = mdToOneLinePlainText(videoPlaylist.description)
let customHtml = ClientHtml.addTitleTag(html, videoPlaylist.name)
customHtml = ClientHtml.addDescriptionTag(customHtml, description)
return ClientHtml.getIndexHTML(req, res)
}
- const description = mdToPlainText(entity.description)
+ const description = mdToOneLinePlainText(entity.description)
let customHtml = ClientHtml.addTitleTag(html, entity.getDisplayName())
customHtml = ClientHtml.addDescriptionTag(customHtml, description)
{ cookie: req.cookies?.clientLanguage, paramLang, acceptLanguage: req.headers['accept-language'] }
)
- return join(__dirname, '../../../client/dist/' + buildFileLocale(lang) + '/index.html')
+ return join(root(), 'client', 'dist', buildFileLocale(lang), 'index.html')
}
private static getEmbedPath () {
- return join(__dirname, '../../../client/dist/standalone/videos/embed.html')
+ return join(root(), 'client', 'dist', 'standalone', 'videos', 'embed.html')
}
private static addManifestContentHash (htmlStringPage: string) {