Esempio n. 1
0
def page_preview():
    url = request.args.get('currentTag', 0)
    url = url.strip("/")

    is_delete = request.args.get('isDeleteBtn', 0)
    is_riki_tab = request.args.get('isRikiLink', 0)

    if is_normal_href_link(url) and is_delete == '' and is_riki_tab != ('Riki' and 'Cancel' and 'Wikielodeon'):
        page = current_wiki.get_or_404(url)

        data = {}
        processor = Processor(page.content)
        data['html'], data['body'], data['meta'] = processor.process()
        return jsonify(result=data['html'])

    return "None"
Esempio n. 2
0
 def setUp(self):
     super(ProcessorTestCase, self).setUp()
     self.processor = Processor(self.page_content)
Esempio n. 3
0
def preview():
    data = {}
    processor = Processor(request.form['body'])
    data['html'], data['body'], data['meta'] = processor.process()
    return data['html']
Esempio n. 4
0
def preview():
    data = {}
    processor = Processor(request.form['body'])
    data['html'], data['body'], data['meta'] = processor.process()
    return data['html']