Skip to content

internal link is broken with Html::addHtml #1300

@lalop

Description

@lalop

This is:

Expected Behavior

When adding internal link via Html::addHtml with a tag like <a href="#anchor">link to anchor</a> I'm expecting to get an intra-doc link.

Current Behavior

Currently there is no link at all, only the content link to anchor

How to Reproduce

<?php
require __DIR__ . '/vendor/autoload.php';

$phpWord = new \PhpOffice\PhpWord\PhpWord();
$section = $phpWord->addSection();
PhpOffice\PhpWord\Shared\Html::addHtml($section, '<a href="#anchor">link to anchor</a>');

Context

  • PHP version: 7
  • PHPWord version: master

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions