o Clarified that makeHtmlValid() outputs XHTML
git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/trunk@654900 13f79535-47bb-0310-9956-ffa450edef68master
parent
ebd246bba0
commit
9d4feb3021
|
|
@ -233,8 +233,10 @@ public final class PluginUtils
|
|||
}
|
||||
|
||||
/**
|
||||
* @param description Javadoc description with HTML tags
|
||||
* @return the description with valid HTML tags
|
||||
* Fixes some javadoc comment to become a valid XHTML snippet.
|
||||
*
|
||||
* @param description Javadoc description with HTML tags, may be <code>null</code>.
|
||||
* @return The description with valid XHTML tags, never <code>null</code>.
|
||||
*/
|
||||
public static String makeHtmlValid( String description )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -132,6 +132,10 @@ public class PluginUtilsTest
|
|||
javadoc = "Generates <i>something</i> <b> for the project.";
|
||||
assertEquals( "Generates <i>something</i> <b> for the project.</b>", PluginUtils.makeHtmlValid( javadoc ) );
|
||||
|
||||
// wrong XHTML
|
||||
javadoc = "Line1<br>Line2";
|
||||
assertEquals( "Line1<br/>Line2", PluginUtils.makeHtmlValid( javadoc ).replaceAll( "\\s", "" ) );
|
||||
|
||||
// special characters
|
||||
javadoc = "& & < > \u00A0";
|
||||
assertEquals( "& & < > \u00A0", PluginUtils.makeHtmlValid( javadoc ) );
|
||||
|
|
|
|||
Loading…
Reference in New Issue