Link to a html file within a repository from trac wiki - trac

I am attempting to link from my wiki to web documentation within the source repository. This functionality I think is provided by using "export" links, e.g.
[export:path/to/file/index.html]
(after setting [browser] render_unsafe_content = yes)
However, when I do this I get the following browser error:
This page contains the following errors:
error on line 17 at column 10: Opening and ending tag mismatch: link line 0 and head
Below is a rendering of the page up to the first error.
(followed by a small snippet of the html page I'm trying to display).
I'm using trac v 1.1.
(see also this related question: How to link to html file in Trac)
UPDATE:
It seems using export does work with other html files, specifically, there's no problem with an xhtml document starting:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
but I am seeing issues with a (valid) html5 document starting:
<!DOCTYPE html>
<html lang="en">
<head>
which I think trac is attempting to parse as xml and then failing.

To create a hyperlink to a file within your repository you can simply use the following wiki syntax:
[browser:<path> <label>]
Where path is the path to the file within your repository and label is the text to be displayed for the link.

Related

NReco PhantomJs with arabic characters

Generating a report in c# using a wonderful tool NReco.PdfGenerator (with PhantomJs as engine) bumped into an issue with arabic symbols.
HTML layout is normally rendered in browser. But generating a PDF I got http://image.prntscr.com/image/73feca61ced346a094e2c652da4fea59.png
HTML has
Any ideas are welcomed
First of all ensure that you have the following meta tag in your HTML <head> section:
<meta http-equiv="content-type" content="text/html; charset=utf-8" />

ELM : Compile ELM page to JS

after creating an ELM page and running it successfully using (elm-reactor),
I have compiled it to generate the js file and open it using browser.
using the following command : elm-make pageName.elm --output target.js.
anyway the target.js page is generated successfully but when opening it using the browser it does not show the desired outcome instead it displays the source code as per the below screen shot
Run elm-make pageName.elm without --output target.js and open produced index.html
Alternatively, create your own *.html file and embed target.js via <script> tag, as you would normally do it for any other JavaScript files:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>My app</title>
<script src="target.js"></script>
<script>
// Run the application manually.
Elm.Target.fullscreen();
<script>
</head>
<body>
</body>
</html>
Assuming that the name of the entry module is Target and you want it to take over the whole page.

File upload with Behat, Mink & PhantomJS

I am trying to upload a file using Behat. Therefore I wrote this simple HTML page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<form method="post" enctype="multipart/form-data">
<input type="file" name="file" id="file" /><br />
<input type="submit" />
</form>
</body>
</html>
and a simple Behat feature:
Feature: test
Scenario: Some Test
Given I am on "/upload.php"
And I attach the file "/path/to/tile" to "file"
When the I attach the file ... to ... phrase is executed, the selenium 2 driver generates a curl request and sends it to PhantomJS: http://localhost:4444/wd/hub/session/5b9a8630-ed8e-11e4-956f-956a9ce75127/element/:wdc:1430215640681/value with params: {"value":["\/path\/to\/file"]}
The request does not terminate unless aborting it and PhantomJS does not react on the request in any way.
I already searched through the net and found several threads saying that it does work and several saying that does not work including an issue on github (https://github.com/detro/ghostdriver/issues/282) which was closed and reopend multiple times.
Versions:
PhantomJS: 2.0.0
Behat: 3.0.15
Mink: 1.6.1
Mink-Selenium2-Driver: 1.2.0
Does anyone know a working solution for this problem?
Could this behaviour exist due to inability to upload files that is a known bug with PhantomJS v 2.0.0?
Basically, a change made in Qt 4.8 and incorporated subsequently in Qt 5.0 prevented clicking on file input elements that were not caused by user gestures.
The solution is discussed further in the issue thread.
To quote, you have to comment one if condition in
/src/qt/qtwebkit/Source/WebCore/html/FileInputType.cpp
//if (!ScriptController::processingUserGesture())
// return;
then compile the binary.

Exporting PDF > HTML with Acrobat Pro, all special chars showing ? despite apparent UTF-8 encoding.

I have a set of PDFs that I am exporting to HTML files using the HTML 4.01 export option. When I open the files in SublimeText or Chrome, all special characters are showing as a ?. The declared encoding is UTF-8:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html40/strict.dtd">
<!-- Created from PDF via Acrobat SaveAsXML -->
<!-- Mapping table version: 28-February-2003 -->
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
The problem persists if I use the SublimeText "Save with encoding-" option, and save with UTF-8.
The odd thing is that this only happening with some PDFs. Others are saving with the correct encoding, but there is no difference in the export process. Is there anything I can check for in the PDF files themselves, or in the export process, to look into this?

Configure library for tomahawk in JSF 2.0

I am trying to upload a file using <t:inputFileUpload/> , in JSF2.0 facelets
for that i need to use namespace xmlns:t="http://myfaces.apche.org/tomahawk/"
but showing error like "No library found for this namespace"
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:t="http://myfaces.apache.org/tomahawk" <!--Error Here : No library found for this namespace--->
In above code last line show's error
How could i manage this error...
No library found for this namespace means you have not added library
Add tomahawk-1.1.9.jar to your Build Path