Extract strings from javascript in html file

Issue #438 new
Former user created an issue

Original issue 438 created by chriscollingto... on 2015-01-29T08:24:04.000Z:

What steps will reproduce the problem?
Extract javascript from an HTML file using the okf_html filter extracts the code block rather than just the text

Example:
function insertDialByVoicemailByText(element)
{
trace.begin("insertDialByVoicemailByText", element);

var allowedActions = [];
var textString = "";

if (classOfService.get("AaDialByExtensionAllowed._"))
{
allowedActions.push("Dial by Extension");
}
if (classOfService.get("AaDialByNameAllowed._"))
{
allowedActions.push("Dial by Name");
}
if (classOfService.get("AaMailboxByExtensionAllowed._"))
{
allowedActions.push("Voicemail by Extension");
}
if (classOfService.get("AaMailboxByNameAllowed._"))
{
allowedActions.push("Voicemail by Name");
}
if (classOfService.get("AaSelfcareByExtensionAllowed._"))
{
allowedActions.push("Selfcare by Extension");
}
}

This should extract "Selfcare by Extension" etc. Suggestion by Jim to modify the filter
script:
ruleTypes: [INCLUDE]

This resulted in the entire function being output to xliff.

Jim suggested raising it as an issue as he thinks it should be relatively simple to manage

Comments (2)

  1. Log in to comment